Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-19-2004, 04:40 AM   PM User | #1
ghoulardi
New Coder

 
Join Date: Mar 2004
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
ghoulardi is an unknown quantity at this point
Question Replacing Double QUOTES " " ??

Hi again

I wanted to add this link to a toolbar Im working on but I cant have Double Quotes.

Code:
javascript:if(o=document.getElementById('ldf')){void(o.outerHTML='');}else{void(document.body.innerHTML+='<iframe id="ldf" scrolling="no" allowtransparency="true"%20src="http://milov.nl/code/linedraw.html"%20style="position:absolute;z-index:100;top:0px;left:0px;width:100%;height:3000px;"></iframe>')}

How would this work without double quotes? Is it possible?

I've searched and found something about replacing doubles with
javascript:document.write(q+'double quoted'+q)
but I tried and could not get it.

Any Ideas?

Thanks


(the script is originaly from milov I think, called linedraw. Lets you draw on this page )
ghoulardi is offline   Reply With Quote
Old 06-19-2004, 04:46 AM   PM User | #2
Willy Duitt
Banned

 
Join Date: Sep 2003
Posts: 3,620
Thanks: 0
Thanked 0 Times in 0 Posts
Willy Duitt is an unknown quantity at this point
Use a single quote and escape with a backslash: \'
Willy Duitt is offline   Reply With Quote
Old 06-19-2004, 05:14 AM   PM User | #3
ghoulardi
New Coder

 
Join Date: Mar 2004
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
ghoulardi is an unknown quantity at this point
Thanks Willie.

Could you show me how it should look if you got a sec. Im pretty retarded.

Thanks!

Last edited by ghoulardi; 06-19-2004 at 05:20 AM..
ghoulardi is offline   Reply With Quote
Old 06-19-2004, 05:35 AM   PM User | #4
Willy Duitt
Banned

 
Join Date: Sep 2003
Posts: 3,620
Thanks: 0
Thanked 0 Times in 0 Posts
Willy Duitt is an unknown quantity at this point
Try this, I used Search & Replace ( " --> \' ):

Code:
javascript:if(o=document.getElementById('ldf')){void(o.outerHTML='');}else{void(document.body.innerHTML+='<iframe id=\'ldf\' scrolling=\'no\' allowtransparency=\'true\'%20src=\'http://milov.nl/code/linedraw.html\'%20style=\'position:absolute;z-index:100;top:0px;left:0px;width:100%;height:3000px;\'></iframe>')}
Willy Duitt is offline   Reply With Quote
Old 06-19-2004, 06:33 AM   PM User | #5
ghoulardi
New Coder

 
Join Date: Mar 2004
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
ghoulardi is an unknown quantity at this point
Dude, the code you put works great, thanks!
But im using reghacker amd it alerts this is
an invalid backlash and only
\\. -- \", -- \n, -- \t, or \000 through \400
can be used.

Is it possible to use these to replace, in js?

Last edited by ghoulardi; 06-19-2004 at 06:36 AM..
ghoulardi is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 03:12 PM.


Advertisement
Log in to turn off these ads.