HighDots Forums  

DHTML Status & Unterminated string constant Error

alt.html.dhtml alt.html.dhtml


Discuss DHTML Status & Unterminated string constant Error in the alt.html.dhtml forum.



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

Default DHTML Status & Unterminated string constant Error - 10-27-2006 , 04:08 PM






Can anyone help with this? I'm not very familair with DHTML, but after
some testing I've figured out what is causing my error. I'm trying to
modify an XSL for the Google Search Appliance to match our site layout.
I'm coming across an error in the rollover DHTML. The error is
"Unterminated string constant" The code works fine within HTML but in
the XSL stylesheet it causes an error. 1 word status' are fine in the
XSL stylesheet.

It only happens when the status attribute has more than one word. I've
tried nbsp code, etc. Does anyone know a solution/workaround to this?

Thanks!!

Here's my code:

<td id="subnav4" class="nav_td_main" width="115" height="20"
onmouseover="this.style.background='#0E566E';this. style.color='#FFFFFF';status='Plan
Your Visit';"
onmouseout="this.style.background='#FFFFFF';status ='';this.style.color='#000000';"
onclick="window.location.href='http://americanhistory.si.edu/visiting/index.cfm'">Plan
Your Visit</td>


Reply With Quote
  #2  
Old   
Mark F.
 
Posts: n/a

Default Re: DHTML Status & Unterminated string constant Error - 11-02-2006 , 10:14 AM







"Kate" <KatherineLMorton (AT) gmail (DOT) com> wrote

Quote:
Can anyone help with this? I'm not very familair with DHTML, but after
some testing I've figured out what is causing my error. I'm trying to
modify an XSL for the Google Search Appliance to match our site layout.
I'm coming across an error in the rollover DHTML. The error is
"Unterminated string constant" The code works fine within HTML but in
the XSL stylesheet it causes an error. 1 word status' are fine in the
XSL stylesheet.

It only happens when the status attribute has more than one word. I've
tried nbsp code, etc. Does anyone know a solution/workaround to this?

Thanks!!

Here's my code:

td id="subnav4" class="nav_td_main" width="115" height="20"
onmouseover="this.style.background='#0E566E';this. style.color='#FFFFFF';status='Plan
Your Visit';"
onmouseout="this.style.background='#FFFFFF';status ='';this.style.color='#000000';"
onclick="window.location.href='http://americanhistory.si.edu/visiting/index.cfm'">Plan
Your Visit</td

"Unterminated string constant" means that a string contains a character that
needs to be escaped OR that a string constant does not have a closing
quotation mark. For example:

"Plan your visit << should be "Plan your visit"

and...,

" "Plan your visit " " << should be "\"Plan your visit\""

The snippet _fails_ to work on any of my browsers as written. However,
changing the 'status' to 'window.status' makes the code work fine for me.
Post a link to the site so I/we can look at the stylesheet as well. Your
code was tested on Opera, Netscape, MSIE, FireFox, Mozilla.

Mark





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.