![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| ||||
| ||||
|
|
Hi Friends, I have some problem here. I am using Asp.net 2.0 but that is not relevant to my Question. I have a <div> tag. div id="dvAArea" runat="server"></div |
|
and an HiddenField input type="hidden" runat="server" id="hidAArea" / on click of a button i have a function function CopyHTML() { document.getElementById('<%= hidAArea.ClientID %>').value = MakeXMLParseable(document.getElementById('<%= dvAArea.ClientID %>').innerHTML); |
|
} the problem here is i want to make the html of dvAArea Xml compatible. but i am finding that the innerHTML property removes the double quotes in IE6. |
|
And as this removal occurs i cannot load it as a validXml (which is used for other purpose). |
#3
| |||
| |||
|
|
On Dec 11, 5:10 pm, Mahernoz <maher... (AT) gmail (DOT) com> wrote: Hi Friends, I have some problem here. I am using Asp.net 2.0 but that is not relevant to my Question. I have a <div> tag. div id="dvAArea" runat="server"></div Div elements don't have a runat attribute in HTML 4. and an HiddenField input type="hidden" runat="server" id="hidAArea" / on click of a button i have a function function CopyHTML() { document.getElementById('<%= hidAArea.ClientID %>').value = MakeXMLParseable(document.getElementById('<%= dvAArea.ClientID %>').innerHTML); Don't post sever code, post what your client gets. How you program your server to do that is your reponsibility. Questions relating to server-side programming should be asked in a community forum that supports your chosen server technology. As far as I can tell, your div element doesn't have any child nodes, so its innerHTML property will be an empty string. Where are the problematic quotes? } the problem here is i want to make the html of dvAArea Xml compatible. but i am finding that the innerHTML property removes the double quotes in IE6. It is something of a paradox to want to use innerHTML to insert "XML compatible". But maybe I'm just easily amused. :-) And as this removal occurs i cannot load it as a validXml (which is used for other purpose). Maybe if we could see the attempted XML, what you get and what you expect, then something more could be said... -- Rob |
#4
| |||
| |||
|
|
On Dec 11, 12:25 pm, RobG <rg... (AT) iinet (DOT) net.au> wrote: On Dec 11, 5:10 pm, Mahernoz <maher... (AT) gmail (DOT) com> wrote: Hi Friends, I have some problem here. I am using Asp.net 2.0 but that is not relevant to my Question. I have a <div> tag. div id="dvAArea" runat="server"></div Div elements don't have a runat attribute in HTML 4. and an HiddenField input type="hidden" runat="server" id="hidAArea" / on click of a button i have a function function CopyHTML() { document.getElementById('<%= hidAArea.ClientID %>').value = MakeXMLParseable(document.getElementById('<%= dvAArea.ClientID %>').innerHTML); Don't post sever code, post what your client gets. How you program your server to do that is your reponsibility. Questions relating to server-side programming should be asked in a community forum that supports your chosen server technology. As far as I can tell, your div element doesn't have any child nodes, so its innerHTML property will be an empty string. Where are the problematic quotes? } the problem here is i want to make the html of dvAArea Xml compatible. but i am finding that the innerHTML property removes the double quotes in IE6. It is something of a paradox to want to use innerHTML to insert "XML compatible". But maybe I'm just easily amused. :-) And as this removal occurs i cannot load it as a validXml (which is used for other purpose). Maybe if we could see the attempted XML, what you get and what you expect, then something more could be said... -- Rob the code generated in div is html but it is also a wellformed xml. any answers? |
#5
| |||
| |||
|
|
On Dec 11, 12:25 pm, RobG <rg... (AT) iinet (DOT) net.au> wrote: On Dec 11, 5:10 pm, Mahernoz <maher... (AT) gmail (DOT) com> wrote: [...] I have a <div> tag. div id="dvAArea" runat="server"></div and an HiddenField input type="hidden" runat="server" id="hidAArea" / on click of a button i have a function function CopyHTML() { document.getElementById('<%= hidAArea.ClientID %>').value = MakeXMLParseable(document.getElementById('<%= dvAArea.ClientID %>').innerHTML); [...] As far as I can tell, your div element doesn't have any child nodes, so its innerHTML property will be an empty string. Where are the problematic quotes? } [...] Maybe if we could see the attempted XML, what you get and what you expect, then something more could be said... [...] putted simply i am finding trouble using innerHTML property with Internet Explorer as it removes the "double quotes" from my rendered html. i am just looking for a way so that the double quotes are not removed when innerHTML is called in Internet Explorer (mozilla works fine). |
#6
| |||
| |||
|
|
On Dec 11, 5:35 pm, Mahernoz <maher... (AT) gmail (DOT) com> wrote: On Dec 11, 12:25 pm, RobG <rg... (AT) iinet (DOT) net.au> wrote: On Dec 11, 5:10 pm, Mahernoz <maher... (AT) gmail (DOT) com> wrote: [...] I have a <div> tag. div id="dvAArea" runat="server"></div and an HiddenField input type="hidden" runat="server" id="hidAArea" / on click of a button i have a function function CopyHTML() { document.getElementById('<%= hidAArea.ClientID %>').value = MakeXMLParseable(document.getElementById('<%= dvAArea.ClientID %>').innerHTML); [...] As far as I can tell, your div element doesn't have any child nodes, so its innerHTML property will be an empty string. Where are the problematic quotes? } [...] Maybe if we could see the attempted XML, what you get and what you expect, then something more could be said... [...] putted simply i am finding trouble using innerHTML property with Internet Explorer as it removes the "double quotes" from my rendered html. i am just looking for a way so that the double quotes are not removed when innerHTML is called in Internet Explorer (mozilla works fine). Given: p onclick="alert(this.innerHTML);">get "innerHTML"</p IE 6 shows: get "innerHTML" so your issue is not with the innerHTML property itself. -- Rob |
#7
| |||
| |||
|
|
On Dec 11, 2:54 pm, RobG <rg... (AT) iinet (DOT) net.au> wrote: On Dec 11, 5:35 pm, Mahernoz <maher... (AT) gmail (DOT) com> wrote: On Dec 11, 12:25 pm, RobG <rg... (AT) iinet (DOT) net.au> wrote: On Dec 11, 5:10 pm, Mahernoz <maher... (AT) gmail (DOT) com> wrote: [...] I have a <div> tag. div id="dvAArea" runat="server"></div and an HiddenField input type="hidden" runat="server" id="hidAArea" / on click of a button i have a function function CopyHTML() { document.getElementById('<%= hidAArea.ClientID %>').value = MakeXMLParseable(document.getElementById('<%= dvAArea.ClientID %>').innerHTML); [...] As far as I can tell, your div element doesn't have any child nodes, so its innerHTML property will be an empty string. Where are the problematic quotes? } [...] Maybe if we could see the attempted XML, what you get and what you expect, then something more could be said... [...] putted simply i am finding trouble using innerHTML property with Internet Explorer as it removes the "double quotes" from my rendered html. i am just looking for a way so that the double quotes are not removed when innerHTML is called in Internet Explorer (mozilla works fine). Given: p onclick="alert(this.innerHTML);">get "innerHTML"</p IE 6 shows: get "innerHTML" so your issue is not with the innerHTML property itself. -- Rob Hi, if i replace that string with this string then there are no double quotes... p onclick="alert(this.innerHTML);"><font class="AInput">3434</font></ p it surprisingly removes the double quotes. |
#8
| |||
| |||
|
|
"Mahernoz" <maher... (AT) gmail (DOT) com> wrote in message news:d401bce5-a592-42d3-ae77-40505450d005 (AT) i29g2000prf (DOT) googlegroups.com... On Dec 11, 2:54 pm, RobG <rg... (AT) iinet (DOT) net.au> wrote: On Dec 11, 5:35 pm, Mahernoz <maher... (AT) gmail (DOT) com> wrote: On Dec 11, 12:25 pm, RobG <rg... (AT) iinet (DOT) net.au> wrote: On Dec 11, 5:10 pm, Mahernoz <maher... (AT) gmail (DOT) com> wrote: [...] I have a <div> tag. div id="dvAArea" runat="server"></div and an HiddenField input type="hidden" runat="server" id="hidAArea" / on click of a button i have a function function CopyHTML() { document.getElementById('<%= hidAArea.ClientID %>').value = MakeXMLParseable(document.getElementById('<%= dvAArea.ClientID %>').innerHTML); [...] As far as I can tell, your div element doesn't have any child nodes, so its innerHTML property will be an empty string. Where are the problematic quotes? } [...] Maybe if we could see the attempted XML, what you get and what you expect, then something more could be said... [...] putted simply i am finding trouble using innerHTML property with Internet Explorer as it removes the "double quotes" from my rendered html. i am just looking for a way so that the double quotes are not removed when innerHTML is called in Internet Explorer (mozilla works fine). Given: p onclick="alert(this.innerHTML);">get "innerHTML"</p IE 6 shows: get "innerHTML" so your issue is not with the innerHTML property itself. -- Rob Hi, if i replace that string with this string then there are no double quotes... p onclick="alert(this.innerHTML);"><font class="AInput">3434</font></ p it surprisingly removes the double quotes. I have read this thread very very carefully and find that a) it has little if anything to do with javascript. b) I don't know what it actually has to do with. You keep mentioning double quotes and their removal but you fail to mention where they are exactly removed from. In any case consider "e; -- Richard. |
#9
| |||
| |||
|
|
On Dec 11, 2:54 pm, RobG <rg... (AT) iinet (DOT) net.au> wrote: On Dec 11, 5:35 pm, Mahernoz <maher... (AT) gmail (DOT) com> wrote: On Dec 11, 12:25 pm, RobG <rg... (AT) iinet (DOT) net.au> wrote: On Dec 11, 5:10 pm, Mahernoz <maher... (AT) gmail (DOT) com> wrote: [...] I have a <div> tag. div id="dvAArea" runat="server"></div and an HiddenField input type="hidden" runat="server" id="hidAArea" / on click of a button i have a function function CopyHTML() { document.getElementById('<%= hidAArea.ClientID %>').value = MakeXMLParseable(document.getElementById('<%= dvAArea.ClientID %>').innerHTML); [...] As far as I can tell, your div element doesn't have any child nodes, so its innerHTML property will be an empty string. Where are the problematic quotes? } [...] Maybe if we could see the attempted XML, what you get and what you expect, then something more could be said... [...] putted simply i am finding trouble using innerHTML property with Internet Explorer as it removes the "double quotes" from my rendered html. i am just looking for a way so that the double quotes are not removed when innerHTML is called in Internet Explorer (mozilla works fine). Given: p onclick="alert(this.innerHTML);">get "innerHTML"</p IE 6 shows: get "innerHTML" so your issue is not with the innerHTML property itself. -- Rob Hi, if i replace that string with this string then there are no double quotes... p onclick="alert(this.innerHTML);"><font class="AInput">3434</font></ p it surprisingly removes the double quotes. |
#10
| |||
| |||
|
|
On Dec 11, 2:54 pm, RobG <rg... (AT) iinet (DOT) net.au> wrote: [...] Given: p onclick="alert(this.innerHTML);">get "innerHTML"</p IE 6 shows: get "innerHTML" so your issue is not with the innerHTML property itself. [...] if i replace that string with this string then there are no double quotes... p onclick="alert(this.innerHTML);"><font class="AInput">3434</font></ p it surprisingly removes the double quotes. |
![]() |
| Thread Tools | |
| Display Modes | |
| |