HighDots Forums  

quotes problem

Javascript JavaScript language (comp.lang.javascript)


Discuss quotes problem in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John Smith
 
Posts: n/a

Default quotes problem - 07-03-2004 , 12:29 AM






Help is appriciated.

I have a line of code that is driving me nuts.

document.write("<a href='javascript:window.external.AddFavorite('http ://0mygoodness.com','Something,
Something, Something')'>")

I had the
<a href='javascript:window.external.AddFavorite('http ://0mygoodness.com','Something,
Something, Something')'>
in another script as
<a href="javascript:window.external.AddFavorite('http ://0mygoodness.com','Something,
Something, Something')">
the difference being the double quotes before javascript and before
the closing >.

The error I am getting is a syntax error, code 0. Through trial and
error I have narrowed it down to this line of code. BIG question is
how should I quote the line???

Thank you in advance for your help.

Reply With Quote
  #2  
Old   
gf
 
Posts: n/a

Default Re: quotes problem - 07-03-2004 , 12:32 AM






Try

document.write("<a
href='javascript:window.external.AddFavorite(\'htt p://0mygoodness.com\',\'So
mething,
Something, Something\')'>")


"John Smith" <johnr.smith (AT) gmail (DOT) com> wrote

Quote:
Help is appriciated.

I have a line of code that is driving me nuts.

document.write("<a
href='javascript:window.external.AddFavorite('http ://0mygoodness.com','Somet
hing,
Quote:
Something, Something')'>")

I had the
a
href='javascript:window.external.AddFavorite('http ://0mygoodness.com','Somet
hing,
Quote:
Something, Something')'
in another script as
a
href="javascript:window.external.AddFavorite('http ://0mygoodness.com','Somet
hing,
Quote:
Something, Something')"
the difference being the double quotes before javascript and before
the closing >.

The error I am getting is a syntax error, code 0. Through trial and
error I have narrowed it down to this line of code. BIG question is
how should I quote the line???

Thank you in advance for your help.



Reply With Quote
  #3  
Old   
Jim Ley
 
Posts: n/a

Default Re: quotes problem - 07-03-2004 , 05:58 AM



On 2 Jul 2004 21:29:07 -0700, johnr.smith (AT) gmail (DOT) com (John Smith)
wrote:
Quote:
I have a line of code that is driving me nuts.
Did you read the FAQ? getting rid of the javascript: would've solved
your problem... http://jibbering.com/faq/#FAQ4_24

Quote:
document.write("<a href='javascript:window.external.AddFavorite('http ://0mygoodness.com','Something,
Something, Something')'>")
Jim
--
comp.lang.javascript FAQ - http://jibbering.com/faq/



Reply With Quote
  #4  
Old   
Hywel
 
Posts: n/a

Default Re: quotes problem - 07-03-2004 , 11:14 AM



In article <40e682f9.508965583 (AT) news (DOT) individual.net>, Jim Ley says...
Quote:
On 2 Jul 2004 21:29:07 -0700, johnr.smith (AT) gmail (DOT) com (John Smith)
wrote:
I have a line of code that is driving me nuts.

Did you read the FAQ? getting rid of the javascript: would've solved
your problem... http://jibbering.com/faq/#FAQ4_24

document.write("<a href='javascript:window.external.AddFavorite('http ://0mygoodness.com','Something,
Something, Something')'>")
Wbo reads those anymore? It's far easier to get someone else to do the
groundwork for you.

--
Hywel

Big Brother Petition - Better TV Wanted!
http://www.petitiononline.com/BBFlood/


Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.