Results 1 to 2 of 2

Thread: AJAX page working in IE6,7,8 but not in Firefox,Safari and Opera

  1. #1
    Join Date
    Oct 2009
    Thanked 0 Times in 0 Posts

    Question AJAX page working in IE6,7,8 but not in Firefox,Safari and Opera

    Hi there,

    I am not a guru jquery coder and still have to learn alot, recently while learning jquery AJAX I have bumped into a weired issue, I have a apge right and in this page I have a dropdown list for people to select an RSS channel that they wish to know more about, the dropdownlist ahs an onChange event which when triggered it will get the value of the selected item in teh dropdownlist and post it to the other 'mini' pages that load on the same page via AJAX by using the GET method - ie: im passing the parameters like a normal querystring would.

    The problem is that when I assign the dropdown value to a variable called dropdown in the following line of code "
    var dropdown = document.getElementById('ddlChannelSelect');
    " it works in IE but not in the other browsers, I have debbugged this in FireBug and it seems that the variable dropdownlist is not actually getting the value of the actual dropdownlist nad it says 'null' or sometimes 'undefined'. Am I doing something wrong ? why is it that it is working in IE but not in other browsers ? can you pls give me a solution with some examples ?

    this is the function that I have btw:

     function loadChannelAndFeeds()
    				var dropdown = document.getElementById('ddlChannelSelect');
    				var index = dropdown.selectedIndex;
    				var ddlvalue = dropdown[index].value;
    				/*var ddlvalue = document.getElementById('ddlChannelSelect').value*/
    				var loadChannelOverviewUrl = "apmMaterial/apmFeeds/rss2.0/channelOverview.php";
    				var loadChannelNoteUrl = "apmMaterial/apmFeeds/rss2.0/widget_channelNote.php";
                                    var loadFeedsUrl = "rssViewFeeds.php";
    				$("#channelNote").html(ajax_load).load(loadChannelNoteUrl , "channelID="+ddlvalue);
    				$("#choChannelOverviewContainer").html(ajax_load).load(loadChannelOverviewUrl , "channelID="+ddlvalue);
    				$("#feedBox_Result").html(ajax_load).load(loadFeedsUrl , "channelID="+ddlvalue);
    Thank you very much,

  2. #2
    Join Date
    Sep 2005
    Thanked 107 Times in 107 Posts


    The following line is not correct

    var ddlvalue = dropdown[index].value;
    It should be

    var ddlvalue = dropdown.options[index].value;
    If you can provide an online page address that would be a lot easier for the forum users.

    Hope this helps.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts