SelectedIndex change doesn't work.

I'm trying to change the selectedIndex of a combo using spry in this way Spry.$$("#combo").selectedIndex, but it doesn't work. Any idea why it doesn't?
Thanks
Andrea

seoinabruzzo wrote:
Ok thanks for the clarification, also if this get me confused a bit, because all the code I wrote use the Spry.$$("#comboProdotti") etc, because I was thinking that just using # in front of the name was enough to let Spry undestand I was referering to an object ID.
And technically this is right, because currently my code is working, but it shouldn't because in the code I never accessed to the object in an array style.
Have a look at www.cofofaniabruzzo.it/js/product.js
So what's the best method to use?
Let me try to say what I understood Single object, use the Spry.$, more than one object that use a class use the Spry.$$. Is this right? In both cases I should be able to get access to HTML tags, is this right again?
Regarding to my original question, as per your suggestion, in both way I'm able to get the selectedIndex property, but if I try to alter the value, it seems that it's ignored.
What i'd like to achieve is move the selectedIndex to 0. Technically this is right for any W3C compatible browser. Guess what? IE point the combo on the last item, while display the first element in the combo. That why I was trying to alter it.
I tried also to use an object observer
    dsProductsObserver.onPostLoad = function(dataSet, data) { Spry.$('combo').selectedIndex = 0; };
but in this context the Spry.$ is not accessible. Why not?
Thanks
Andrea
Hello,
Your site doesn't work. Is it maybe behind a firewall?
If you want to target only one node that has an id attribute on it, its best to use the Spry.$ function, for all others you can use the Spry.$$ element selector.
Heres some info about the Spry selectors : http://labs.adobe.com/technologies/spry/articles/element_selector/index.html
What i alway do to select certain elements is this:
var element = Spry.$('combo'),
     target = 'name';
for(var i = 0; i < element.length; j++){
     if(element[i].value == target){
          element[i].selectedIndex = i;
If the value is the name as our target it will select that. This will probably help you out with your IE issue. Just change 'name' in to the value of your first option. And it should be selected.

Similar Messages

  • XML Changer doesn't work in Firefox works in Internet Explorer

    Hi
    Can anyone help me i have a XML Changer doesn't work in Firefox works in Internet Explorer.
    I have posted the page here http://www.endeavourcfl.co.nz/Venues.html as you can see my other flash files work fine, it is only the XML Changer (no pictures appear at all), it was working previously but for some reason it has stopped have tried on many computers, all plugins are up to date and i have FF versions 16 and 17

    Its working fin in latest version of Firefox. <br>
    Update your Firefox <br>
    http://www.mozilla.org/en-US/firefox/all.html
    <br><br><br>
    Please check if all your plugins are up-to-date. To do this, go to the [http://mozilla.com/plugincheck Mozilla Plugin Check site].
    Once you're there, the site will check if all your plugins have the latest versions.
    If you see plugins in the list that have a yellow ''Update'' button or a red ''Update now'' button, please update these immediately.
    To do so, please click each red or yellow button. Then you should see a site that allows you to download the latest version. Double-click the downloaded file to start the installation and follow the steps mentioned in the installation procedure.

  • TFS 2012 Update 4 - Build Alert - "A build controller or agent's status changes" doesn't work correctly

    We are running TFS2012 Update 4 and have set up some build alerts.  The alert we have set up is "A build controller or agent's status changes".  When this alert is first set up the default filters which are included are for fields "Team
    Project" and "Status".  However through much testing we have discovered that when either of these fields are included as a filter the alert doesn't work.  When other fields are used in the filter the alert works fine (as long
    as neither of the stated fields are included), indeed if all alert filters are removed then the alert also works successfully.  Has anyone else experienced this?  Is there an issue with the fields "Team Project" and "Status"?

    Hi T Quinn,   
    Thanks for your post.
    I reproduced this scenario in my TFS 2012 Update 4 Server and received the same result.
    For this scenario, please submit it to Microsoft Connect Feedback portal at:
    https://connect.microsoft.com/VisualStudio. Microsoft engineers will evaluate them seriously. 
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Submenu HOVER change doesn't work

    I've tried everything I could think of (for the past 2
    hours).
    The Submenu Text Change Instruction doesn't work for me (PC,
    IE7 and Firefox)
    I've tried to add all kinds of properties to make the SUBMENU
    Item change when the mouse hovers over it. Whatever I do, it always
    shows only on the main menu item (the main menu item that contains
    the submenu).
    In the instructions it says to change this:
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
    but it's just not working. SOMEBODY HELP PLEEEZE!!!!!
    THANKS! Very very greatful for any enlightenment at 1:30 in
    the morning. ;)
    (The submenu indication arrow "SpryMenuBarDown.gif" isn't
    showing up in the preview either, btw.... shows in DW but not when
    previewed in browsers. ...but, I guess, that's a separate problem.
    sigh.)

    ok, here is what I've come up with (not fully functional, for
    the color won't show but AT LEAST the underline shows on hover)
    IN THE SPRY STYLE SHEET I've added:
    a.submenulink:hover {
    color: #CC0000;
    text-decoration: underline;
    In the HTML code (directly in the 'a' tag of the submenu
    list) I've added:
    <li><a href="#" target="_self"
    class="MenuBarItemSubmenu">Hot Topics</a>
    <ul>
    <li><a href="#" target="_blank"
    class="submenulink">Water and Sewer</a></li>
    <li><a href="#" target="_blank"
    class="submenulink">Green Buildings</a></li>
    NOTICE that the first link is the MAIN MENU item (not in the
    submenu but the header of the menu, if you will).

  • "Publish Site Changes" doesn't work on FTP

    When publishing via the FTP option in iWeb I always have to "Publish Entire Site". If I only publish site changes, the site will no longer load when I try to load it in any web browser. Publish site changes worked flawlessly when I had my site hosted via iWeb but no longer works with a 3rd party host. I've tried publishing to a Folder (Publish entire site, then make changes, then Publish site changes) and then uploading via and FTP client - same result. Any ideas, or am I stuck publishing my ENTIRE site every time I make a change?

    Hi Alex,
    Please try to connect to your server using some third party FTP client such as Filezilla. If it works, please export your site HTML and use filezilla to upload the site. If it do not work, please contact your hosting service provider and get the correct FTP info.
    Regards,
    Aish

  • Javascript , date Field change doesn't work

    I want to display the expiration date automatically as soon as I selected a date of issue but it does not work..
    <td width="190px" valign="top" class="ms-formlabel">
    <H3 class="ms-standardheader"><nobr>StartDate</nobr></H3>
    </td>
    <td width="400px" valign="top" class="ms-formbody">
    <SharePoint:FormField runat="server" id="ff2{$Pos}" ControlMode="New" FieldName="StartDate" __designer:bind="
    {ddwrt:DataBind('i',concat('ff2',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@StartDate')}"/>
    <Sha
    rePoint:FieldDescription runat="server" id="ff2description{$Pos}" FieldName="StartDate" ControlMode="New"/>
    </td>
    </tr>
    <tr>
    <td width="190px" valign="top" class="ms-formlabel">
    <H3 class="ms-standardheader"><nobr>EndDate</nobr></H3>
    </td>
    <td width="400px" valign="top" class="ms-formbody">
    <SharePoint:FormField runat="server" id="ff3{$Pos}" ControlMode="New" FieldName="EndDate" __designer:bind="
    {ddwrt:DataBind('i',concat('ff3',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@EndDate')}"/>
    <SharePoint:FieldDescription runat="server" id="ff3description{$Pos}" FieldName="EndDate" ControlMode="New"/>
    </td>
    </tr>
    <script type="text/javascript" src="../../JQuery/jquery.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
    alert (&quot;Test&quot;);
       $(&apos;#ff2&apos;).change(function(){
       alert (&quot;Test&quot;);
           var startVal = $(this).val();
    var month = startVal.getMonth();
    var day = startVal.getDate();
    var year = startVal.getFullYear();
    year = year  + 1;
    endVal= day+&apos;/&apos;+&apos;month&apos;+&apos;/&apos;+&apos;Year&apos;;
           $(&apos;#ff3&apos;).val(endVal);
    </script>

    Hi,
    Please add the following code into the new form page. You can also add a content editor web part into the new form page and add the code into the web part.
    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(function () {
    $("input[title='Start Date']").blur(function () {
    var startVal = $(this).val();
    var startDate = new Date(startVal);
    var month = startDate.getMonth() + 1;
    var day = startDate.getDate();
    var year = startDate.getFullYear() + 1;
    $("input[title='End Date']").val(month + "/" + day + "/" + year);
    </script>
    Or here is a thread talk about the similar issue for your reference:
    http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/MS-SharePoint/Q_27765240.html
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Find/Change doesn't worki

    Is there some secret to finding and changing? Seems pretty straight forward. I have a large spreadsheet and want to change a number in a formula from 360 to 365. When I enter 360 in 'Find' and 365 in 'Replace' and then click Replace nothing happens.
    What am I doing wrong?

    Hi pw1840,
    Quote: "...but I am unable to make the replacement even when I click on that option." unquote. You're correct pressing Replace doesn't make any changes. When Replace & Find highlights the number within the formula I manually type in the required number then press Next. In my mind this is a safety feature.
    Excel Replace All changes numbers within formulae as well. BOING wrong answer!
    In Numbers:
    1. "Replace All" doesn't effect formulae, but does effect numbers within larger numbers.
    2. "Replace & Find" + "Replace" will change outside of formulae only
    3. "Replace & Find" finds all searched for numbers, even within larger numbers. When it finds it in formula it requires manual changes.
    My suggestion is to use "Find & Replace" + Next, even when searching for a text string.
    It's easy for me to understand Numbers way is much more preferable than Excel.
    This may have been an enlightening exercise for all perhaps.
    Sincerely,
    RicD

  • Track Changes doesn't work at all in 5.5.2?

    It isn't recognizing any changes. Attempted to multiple document files.
    Also tried cycling the On/Off toggle but that does nothing.
    Anyone else experiencing this?

    Did you recently updated to 7.0.4? Even for me same also issues.

  • I had to change my Apple ID and password in itunes. Now my icloud doesn't work and I can't update my apps on my iPhone. I have looked at suggestions on the community pages and apple suggestions but none of them are relevant to iOS 8.1.2  icloud just

    I had to change my Apple ID and password in itunes. Now my icloud doesn't work and I can't update my apps on my iPhone. I have looked at suggestions on the community pages and apple suggestions but none of them are relevant to iOS 8.1.2
    icloud just keeps bringing up my old email address & asking for my old password which doesn't exist anymore and when I try to sign out of icloud it wants my old password, when I tried to change my primary email back to the old one it wants me to verify it through an email address that doesn't exist. Please can you help me sort out this nightmare.

    Hi skippy2012trev,
    Welcome to the Apple Support Communities!
    I understand that you updated your Apple Id and password but now you are being prompted for the old information in iCloud. You are on the right track by changing the Apple ID back to the previous email address temporarily so that you can sign out. You should not need to verify the email address. After you edit the Apple ID back to the old email address and then sign out of iCloud on your iPhone, edit the Apple ID back to the address you would currently like to use. There is no need to change the password again, only the email address, unless you prefer to update the password again.
    If you're asked for the password to your previous Apple ID when signing out of iCloud - Apple Support
    Change your Apple ID temporarily
    If signing out and back in to iMessage or FaceTime didn't help, try these steps:
    Change your Apple ID to the Apple ID you used previously. You shouldn't need to verify the email address.
    Tap Settings > iCloud. Complete these steps only if the Find My [Device] setting is turned on:
    Scroll down and tap Sign Out, then tap Sign Out to confirm. If you're using iOS 7 or earlier, tap Delete Account, then tap Delete to confirm.
    Tap Keep on My [Device] or Delete from My [Device]. In either case, your data remains in iCloud and will be updated on your device when you sign in to iCloud again.
    Enter the password for your previous Apple ID.
    Change your Apple ID to the new email address that you want to use. You'll need to verify the email address.
    Return to Settings > iCloud and sign in with your new Apple ID.
    Cheers,
    Joe

  • I have tried to change my cd visa number and it doesn't work. Advices ?

    Well I am ****** ! I have done what my phone ask and still it doesn't work. I must say this is a first but then I have never had to update my credit card info before either.
    I want to buy something (new effects for a pic app) and then I have to update my credit card number etc... But *** ? iTunes doesn't accept it. It says I have to contact you. The red is expiration date and year which I fully typed 3 times already without any changes.
    Did I mention I was ****** ? Yes I think I did but this really ***** apple, your products are already too expensive for what they are worth but we can't buy effects ? This is really a bad idea. You will get high not good image for such a small problem  

    you are not speaking to Apple, this forum is made up of users like you.  You need to contact Apple directley via iTunes support: https://expresslane.apple.com/Issues.action.  Also, lay off the offensive language, that will get you nowhere with any customer service.

  • Changing my apple ID name doesn't work

    Hi all,
    I have following problem which is quite annoying ... So, when I log in on the developer site, my first name is: ezfzsd (which I can't seem to find anywhere on my account)
    When I go to my my apple ID account my first and last name are filled in correctly. If I change both, my last name is edited (as it should be) but my
    the word 'ezfzsd' doesn't change at all. Whatever I do, it keeps displaying the wrong name.
    Does anyone know what the problem might be? Or how to fix this?
    Thanks!

    No idea what  "My apple ID account doesn't work on my itunes but it does on the web" means.
    Please explain

  • I changed the name of my apple id and now I can't use the app store on my phone correctly because it's using my apple id's old name. I signed out and in on itunes and synced my iphone. Still doesn't work. Help please?

    I changed the name of my apple id and now I can't use the app store on my phone correctly because it's using my apple id's old name. I signed out and in on itunes and synced my iphone. Still doesn't work. Help please?

    Settings>Store...tap the ID shown...sign out...sign back in with the ID you want to use.
    Note: Apps are forever tied to the Apple ID used to originally obtain them. They cannot be updated using any other Apple ID other than the one they were originally obtained with.

  • Wrt300n- wireless doesn't work after changing default IP scheme

    When I change the 192.168.1.0 default network scheme my wireless connection doesn't work to the internet I can get to the router's configuration ( I need to change for VPN reasons)  The LAN connections work fine.  Any ideas or settings that I can look at.

    Reset your router by holding down the reset button on the back for 30 sec. This should get you on the net but you will need to configure your router wireless settings to secure it. Good Luck!

  • I changed my main email on my apple ID and now it doesn't work and still uses my old one and with my new and old email my password doesn't work

    I changed my main email on my apple ID now when I try sign in with the new email it doesn't work and neither does my old one so I don't know what happened, any help?... I made a new apple ID and on my iPod it tries to use my old one and I can't change it to my new apple ID I've gone on to settings and iTunes and App Store and changed it to my new apple Id yet when I buy apps or try update them it uses my old apple ID I don't know what to do any help??

    - Apps are locked to the account that purchased them.
    - To update apps you have to sign into the account that purchased the apps. If you have apps that need updating purchased from more than one account you have to update them one at a time until the remaining apps were purchased from one account.
    If you can't log into Settings>iTunes and App stores with your new ID them mean there is a problem. Try restting the password and try to sign in again.
    iTunes Store: Retrieving and changing passwords (Apple ID)
    Can you sign in with the new ID on your computer?
    Last, contact iTunes.
    Apple - Support - iTunes - Contact Us

  • HT4314 Hi i need help please i been playing clash of clans over 13 months. And today o realise what someone using my game Centra. Someone playing on my game Clash of Clans. I been change my Apple ID password, email, but doesn't work. Then I playing game I

    Hi i need help please i been playing clash of clans over 13 months. And today o realise what someone using my game Centra. Someone playing on my game Clash of Clans. I been change my Apple ID password, email, but doesn't work. Then I playing game I can see what someone else trying connecting to my game And I don't know what to do.So if you can help me please? I don't wanna lose my game.

    Contact iTunes
    Contact iTunes

Maybe you are looking for