HTML Help Forum Index HTML Help
Please Search for the answer to your question before asking it! Thanks.
 

Fixing hex character codes
Post a Reply to this Topic Ask a New Question
Click here to go to the original topic
       HTML Help Forum Index -> Javascript
View previous topic :: View next topic  
Author Message
BennyBolton



Joined: 07 Nov 2009
Posts: 7

Posted: Sat Nov 07, 2009 4:41 pm     Fixing hex character codes  

When in javascript I say:

document.getElementById("file").innerHTML="<div align=center><table border cellpadding=5><tr><th>Genres</th><th>Files</th></tr><tr><td><a href='browse.html?folder=screensavers
>Screen Savers
</a></td><td>2</td></tr><tr><td><a href='browse.html?folder=apps
>Applications
</a></td><td>0</td></tr></table></div>";

and then I say

window.alert(document.getElementById("file"));

It results with

<div align="center"><table border="1" cellpadding="5"><tbody><tr><th>Genres</th><th>Files</th></tr><tr><td><a href="browse.html?folder=screensavers%0D%3EScreen%20Savers%0D%3C/a%3E%3C/td%3E%3Ctd%3E2%3C/td%3E%3C/tr%3E%3Ctr%3E%3Ctd%3E%3Ca%20href=" browse.html?folder="apps">Applications
</a></td><td>0</td></tr></tbody></table></div>

How do I get it to say characters rather than there Hex codes
PayneLess Designs



Joined: 28 Feb 2007
Posts: 3593
Location: Biloxi, MS

Posted: Sun Nov 08, 2009 5:17 am      

Try putting it all on one line and adding the single quote mark:

Code:
<a href='browse.html?folder=screensavers'>Screen Savers</a>


Code:
<a href='browse.html?folder=apps'>Applications</a>
BennyBolton



Joined: 07 Nov 2009
Posts: 7

Posted: Sun Nov 08, 2009 10:22 am      

thanks, just saw it, I didn't end the string.
PayneLess Designs



Joined: 28 Feb 2007
Posts: 3593
Location: Biloxi, MS

Posted: Sun Nov 08, 2009 6:35 pm      

:lol: Yep. You're welcome.
 
 
DARFUR
HOSTING / DESIGN
MAKE MONEY

       HTML Help Forum Index -> Javascript
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group