Our application works fine in mozilla , but not on IE . We use prototype java script framework 1.5. I did some debug and found where it''s failing in one instance. It''s failing when importing xml file.( document.importNode ). The below code fails on this statement $ (''search_content'').appendChild (document.importNode (response.responseXML.childNodes [0].childNodes [1] , true) ) ; my.asp: %><?xml version="1.0" encoding="UTF-8"?> <div xmlns="http://www.w3.org/1999/xhtml"> <div id="searchform_<%=formID%>" class="collapsible_boxes"> ....... Any help would be greatly appreciated here.. new Ajax.Request ( ''/ajax/search/my.asp'', { method: ''get'', parameters: ''formID='' + formID, onSuccess: function (response) { clearSearch (); alert(response.responseXML.documentElement.childNodes [0].childNodes [1].text); $ (''search_content'').appendChild (document.importNode (response.responseXML.childNodes [0].childNodes [1] , true) ) ; // $ (''search_content'').appendChild (document.importNode (response.responseXML.documentElement.childNodes [0].childNodes [1] , true) ) ; var nodes response.responseXML.getElementsByTagName (''script'') ; for (var i 0; i < nodes.length; i++) { eval (nodes [i].textContent) ; } openBox () ; $ (''search_bt'').style.display = ''block''; } } ) ; --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I just tested if IE 7 support importNode , i see that it''s not supported. Could you please help me here , wht''s the alertnative here. if(!document.importNode) { alert("not supported"); } On Mar 24, 11:53 am, "Srini" <kschowd...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Our application works fine in mozilla , but not on IE . We use > prototype java script framework 1.5. > I did some debug and found where it''s failing in one instance. > > It''s failing when importing xml file.( document.importNode ). The > below code fails on this statement > $ (''search_content'').appendChild (document.importNode > (response.responseXML.childNodes [0].childNodes [1] , true) ) ; > > my.asp: %><?xml version="1.0" encoding="UTF-8"?> > <div xmlns="http://www.w3.org/1999/xhtml"> > <div id="searchform_<%=formID%>" class="collapsible_boxes"> > ....... > > Any help would be greatly appreciated here.. > > new Ajax.Request ( > ''/ajax/search/my.asp'', > { > method: ''get'', > parameters: ''formID='' + formID, > onSuccess: function > (response) > { > clearSearch > (); > > alert(response.responseXML.documentElement.childNodes > [0].childNodes [1].text); > > $ (''search_content'').appendChild (document.importNode > (response.responseXML.childNodes [0].childNodes [1] , true) ) ; > // $ > (''search_content'').appendChild (document.importNode > (response.responseXML.documentElement.childNodes [0].childNodes [1] , > true) ) ; > > var nodes > response.responseXML.getElementsByTagName (''script'') ; > for (var i > 0; i < nodes.length; i++) > { > eval (nodes > [i].textContent) ; > } > > openBox () ; > $ > (''search_bt'').style.display = ''block''; > } > } > ) ;--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
importNode issue is solved by using $(''search_content'').innerHTML =response.responseText; But i m hiding content which supposed to be displayed when i click on links not coming up. when i debug below alert showing undefined message. do you think i should use some thing else here. var nodes = response.responseXML.getElementsByTagName (''script'') ; for (var i = 0; i < nodes.length; i++) { alert(nodes[i].textContent); eval (nodes [i].textContent) ; } On Mar 24, 2:53 pm, "Srini" <kschowd...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I just tested if IE 7 support importNode , i see that it''s not > supported. Could you please help me here , wht''s the alertnative > here. > > if(!document.importNode) > { > alert("not supported");} > > On Mar 24, 11:53 am, "Srini" <kschowd...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Our application works fine in mozilla , but not on IE . We use > > prototype java script framework 1.5. > > I did some debug and found where it''s failing in one instance. > > > It''s failing when importing xml file.( document.importNode ). The > > below code fails on this statement > > $ (''search_content'').appendChild (document.importNode > > (response.responseXML.childNodes [0].childNodes [1] , true) ) ; > > > my.asp: %><?xml version="1.0" encoding="UTF-8"?> > > <div xmlns="http://www.w3.org/1999/xhtml"> > > <div id="searchform_<%=formID%>" class="collapsible_boxes"> > > ....... > > > Any help would be greatly appreciated here.. > > > new Ajax.Request ( > > ''/ajax/search/my.asp'', > > { > > method: ''get'', > > parameters: ''formID='' + formID, > > onSuccess: function > > (response) > > { > > clearSearch > > (); > > > alert(response.responseXML.documentElement.childNodes > > [0].childNodes [1].text); > > > $ (''search_content'').appendChild (document.importNode > > (response.responseXML.childNodes [0].childNodes [1] , true) ) ; > > // $ > > (''search_content'').appendChild (document.importNode > > (response.responseXML.documentElement.childNodes [0].childNodes [1] , > > true) ) ; > > > var nodes > > response.responseXML.getElementsByTagName (''script'') ; > > for (var i > > 0; i < nodes.length; i++) > > { > > eval (nodes > > [i].textContent) ; > > } > > > openBox () ; > > $ > > (''search_bt'').style.display = ''block''; > > } > > } > > ) ;- Hide quoted text - > > - Show quoted text ---~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
It''s solved by using text. for IE: nodes[i].text for other browsers: nodes [i].textContent On Mar 24, 3:35 pm, "Srini" <kschowd...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> importNode issue is solved by using $(''search_content'').innerHTML > =response.responseText; > But i m hiding content which supposed to be displayed when i click on > links not coming up. > when i debug below alert showing undefined message. do you think i > should use some thing else here. > > var nodes = response.responseXML.getElementsByTagName > (''script'') ; > for (var i = 0; i < nodes.length; i++) > { > alert(nodes[i].textContent); > eval (nodes [i].textContent) ; > } > > On Mar 24, 2:53 pm, "Srini" <kschowd...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > I just tested if IE 7 support importNode , i see that it''s not > > supported. Could you please help me here , wht''s the alertnative > > here. > > > if(!document.importNode) > > { > > alert("not supported");} > > > On Mar 24, 11:53 am, "Srini" <kschowd...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Our application works fine in mozilla , but not on IE . We use > > > prototype java script framework 1.5. > > > I did some debug and found where it''s failing in one instance. > > > > It''s failing when importing xml file.( document.importNode ). The > > > below code fails on this statement > > > $ (''search_content'').appendChild (document.importNode > > > (response.responseXML.childNodes [0].childNodes [1] , true) ) ; > > > > my.asp: %><?xml version="1.0" encoding="UTF-8"?> > > > <div xmlns="http://www.w3.org/1999/xhtml"> > > > <div id="searchform_<%=formID%>" class="collapsible_boxes"> > > > ....... > > > > Any help would be greatly appreciated here.. > > > > new Ajax.Request ( > > > ''/ajax/search/my.asp'', > > > { > > > method: ''get'', > > > parameters: ''formID='' + formID, > > > onSuccess: function > > > (response) > > > { > > > clearSearch > > > (); > > > > alert(response.responseXML.documentElement.childNodes > > > [0].childNodes [1].text); > > > > $ (''search_content'').appendChild (document.importNode > > > (response.responseXML.childNodes [0].childNodes [1] , true) ) ; > > > // $ > > > (''search_content'').appendChild (document.importNode > > > (response.responseXML.documentElement.childNodes [0].childNodes [1] , > > > true) ) ; > > > > var nodes > > > response.responseXML.getElementsByTagName (''script'') ; > > > for (var i > > > 0; i < nodes.length; i++) > > > { > > > eval (nodes > > > [i].textContent) ; > > > } > > > > openBox () ; > > > $ > > > (''search_bt'').style.display = ''block''; > > > } > > > } > > > ) ;- Hide quoted text - > > > - Show quoted text -- Hide quoted text - > > - Show quoted text ---~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---