kiernan7 Posted April 13, 2007 Share Posted April 13, 2007 Hey AJAX gurus! I have a load of AJAX in some complicated forms. We have lots of list boxes, and rather than populate them all with all of the options, we have the values in the table and an onClick() which fires a request for the values as needed. This works fine everywhere. But... Recently we have added a new table that is the parent to a child table whose children feed a dropdown with a 'Go' button alongside it. When clicking the 'go' a second window opens for editing of the child record. All of this works fine as well. But... At the end (after a 'save') on the secondary window, I end with the window having a single button that says 'Close Window'. When the user clicks this, it fires a derivation of the original AJAX populating function (only with 'opener' added to the 'document.GetElementbyID' function). This works fine in Firefox, but in Explorer it breaks! For some reason, there seems to be a DOM difference between a 'self' window and an 'opener' window -- at least as it pertains to dropdowns. Here is the code, and here's what breaks: NOTE: What I do here is feed back the list with a bar separator ("|") and then split it up. Again, this works FINE with the 'self' window. Also, all of these platform 'IFs' are new, I never needed them before on the original ('self') version of this. HELP!!!! TIA! -- John Kiernan response = req.responseText; var d = new Array(); d = response.split('|'); if (is_ie5up) { } else { opentarget.length=0; } if (d.length > 0) { for (i=0; i < d.length; i++) { opttext = d; optvalue = d; if (is_ie5up) { opentarget.options = opttext; } else { opentarget.options = new Option(opttext,optvalue ); } } } else { if (is_ie5up) { opentarget.options = "No Values"; } else { opentarget.options[0] = new Option("No Values",""); } } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.