Welcome to WebmasterWorld Guest from 54.196.238.210

Forum Moderators: open

Message Too Old, No Replies

Scripting Error Help

unterminated string constant error in java script

     

keyplyr

8:22 am on Jun 17, 2003 (gmt 0)

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




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

8:49 am on Jun 17, 2003 (gmt 0)

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



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

9:00 am on Jun 17, 2003 (gmt 0)

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



Hi BlobFisk,

Getting "unterminated string constant" on my test page.

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

keyplyr

9:08 am on Jun 17, 2003 (gmt 0)

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



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

 

Featured Threads

Hot Threads This Week

Hot Threads This Month