Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / December 2007

Tip: Looking for answers? Try searching our database.

Problem dealing with double quotes in InnerHTML

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mahernoz - 11 Dec 2007 07:40 GMT
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
Manuel Ricca - 11 Dec 2007 11:12 GMT
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

> Hi Friends,
>
[quoted text clipped - 33 lines]
> Regards,
> Mahernoz

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.