homepage Welcome to WebmasterWorld Guest from 54.196.225.45
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Unterminated string constant followed by
Syntax error
Daily Sparring




msg:1495442
 12:34 am on Dec 24, 2003 (gmt 0)

<tr style="cursor:pointer" onClick="location.href=Web_Design_and_Hosting.htm'" onMouseOver="this.className='menu_category_tr_over'" onMouseOut="this.className="''">
<td height="25"><a href="Web_Design_and_Hosting.htm">Web Design and Hosting</a></td>
</tr>

What am I missing here? I get a string error followed by a syntax error. THank you in advance.

 

Purple Martin




msg:1495443
 1:51 am on Dec 24, 2003 (gmt 0)

I recently told someone that their single and double quotes were a mess. Yours are a mess too ;-)

Look at the onClick attribute:

onClick="location.href=Web_Design_and_Hosting.htm'"

Can you see how an extra ' has crept in there? That's bad news.

The onMouseOut attribute also has problems.

HTH

Daily Sparring




msg:1495444
 2:11 am on Dec 24, 2003 (gmt 0)

Ok, so what might the MouseOut problem be? Could you please advise. Thank you for pointing out the missed '.

HocusPocus




msg:1495445
 2:12 am on Dec 24, 2003 (gmt 0)

Just to save you 10 mins I think the onclick should infact be

onClick="location.href='Web_Design_and_Hosting.htm'"
..
onMouseOut="this.className=''"

[single single double]

Daily Sparring




msg:1495446
 2:16 am on Dec 24, 2003 (gmt 0)

Woohoo..... Thanks! I was going stir freakin crazy. I cannot believe it was that obvious. Man, you get looking at code sometimes and your eyes go funny.

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