homepage Welcome to WebmasterWorld Guest from 54.166.128.254
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Scripting Error Help
unterminated string constant error in java script
keyplyr

WebmasterWorld Senior Member keyplyr us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



 
Msg#: 737 posted 8:22 am on Jun 17, 2003 (gmt 0)


I can't seem to determine where the error is here - someone?

<script type="text/javascript">document.write('<a title="ocean beach map"
href="http://maps.yahoo.com/py/maps.py?BFCat=&amp;Pyt=Tmap&amp;newFL=Use+Address+Below&amp;addr=5155+West+Point+Loma+Boulevard&amp;csz=Ocean+Beach%2C+CA%2C+92107&amp;country=us&amp;Get%A0Map=Get+Map" target="_new">Ocean Beach (map)</a>');</script>

Thanks

 

BlobFisk

WebmasterWorld Senior Member blobfisk us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 737 posted 8:49 am on Jun 17, 2003 (gmt 0)

Hey keyplr,

What error are you getting?

Is the document.write all on one line? If it has link break in the code, it will fail! Also, is there a space between the " at the end of the href and before 'target'?

keyplyr

WebmasterWorld Senior Member keyplyr us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



 
Msg#: 737 posted 9:00 am on Jun 17, 2003 (gmt 0)

Hi BlobFisk,

Getting "unterminated string constant" on my test page.

Yes, all on one line, and the space should be before the target.

keyplyr

WebmasterWorld Senior Member keyplyr us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



 
Msg#: 737 posted 9:08 am on Jun 17, 2003 (gmt 0)

Got it - it was a break in the string due to the wrap.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved