HTML Tutorial


 /help/HTML Help Forum   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Fixing hex character codes
Post new topic   Reply to topic    HTML Help Forum -> Javascript
View previous topic :: View next topic  
Author Message
BennyBolton



Joined: 07 Nov 2009
Posts: 7

PostPosted: Sat Nov 07, 2009 4:41 pm     Fixing hex character codes Reply with quote

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: 4289
Location: MS

PostPosted: Sun Nov 08, 2009 5:17 am     Reply with quote

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

PostPosted: Sun Nov 08, 2009 10:22 am     Reply with quote

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



Joined: 28 Feb 2007
Posts: 4289
Location: MS

PostPosted: Sun Nov 08, 2009 6:35 pm     Reply with quote

Laughing Yep. You're welcome.
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum -> Javascript All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial