Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Problem dealing with double quotes in InnerHTML

Reply
Thread Tools

Problem dealing with double quotes in InnerHTML

 
 
Mahernoz
Guest
Posts: n/a
 
      12-11-2007
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).


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).


Regards,
Mahernoz
 
Reply With Quote
 
 
 
 
Manuel Ricca
Guest
Posts: n/a
 
      12-11-2007
Hello Mahernoz,

Maybe I'm missing the point here but why don't you just use normal
HTML character codes? A quotation mark is represented by &quot;
You can also use &ldquo; and &rdquo; if you want left and right double
qutoation marks.


Manuel Ricca


On Dec 11, 7:40 am, Mahernoz <(E-Mail Removed)> 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>
>
> 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).
>
> 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).
>
> Regards,
> Mahernoz


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
regex to avoid escaped quotes or double quotes jOhn Ruby 1 01-29-2008 08:31 PM
Problem dealing with double quotes in InnerHTML Mahernoz Javascript 19 12-15-2007 06:58 AM
PHP double quotes inside double quotes MSB Computer Support 11 10-21-2006 01:09 PM
cannot convert parameter from 'double (double)' to 'double (__cdecl *)(double)' error Sydex C++ 12 02-17-2005 06:30 PM
Quotes/Double Quotes in Image Control Chris White ASP .Net 1 09-22-2004 06:22 AM



Advertisments