Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Odd script error...

Status
Not open for further replies.

JediBMC

MIS
Dec 5, 2003
178
US
Ok, I am at my witts end. I am receiving an error on one of my pages. It is REALLY strange, as the portion of the page that the error references is actually inserted using SSI. Other pages with the same SSI do not generate this error.

The error is:
Code:
Line: 39
Char: 32
Error: Expected end of statement
Code: 0
Url: [URL unfurl="true"]http://servername/bulletins-addition.asp[/URL]

The line being referenced (39) is as follows: (Sorry, upfront, for the horrible wrapping and such... it is generated via ASP.)
Code:
<a class='menuitem' onmouseover='style.backgroundColor="#264B88", style.color="#FFFFFF"' onmouseout='style.backgroundColor="#FFFFFF", style.color="#264B88"' title='PRAPAS - Performance Evaluations' href='[URL unfurl="true"]https://www.prapashr.com/default.asp'[/URL] onclick='window.open(this.href,"newein"); return false;' onkeypress='window.open(this.href,"newein"); return false;'>Evaluations</a>

To muddy the waters even more, when I refresh the page, the error is not displayed.

HELP!!!!!

-Brian-
I'm not an actor, but I play one on TV.
 
Well, since this is a client side error, not server side, and the error is pointing to a DHTML element, I figured this would be the appropriate forum.

-Brian-
I'm not an actor, but I play one on TV.
 
Looks like an error in the asp page. Have you tried changing this SSI reference to an asp page that you know is working?
 
The error appears in the status bar of the page as a piece of paper with a yellow triangle containing an explimation point. This is the symbol, in IE, of a scripting error on a page. When you double click the icon, you get a dialog box stating:
Problems with thei Web page might pervent if form being displayed properly or functioning properly. In the future, you can display this message by double-clicking the warning icon displayer in the status bar.

-Brian-
I'm not an actor, but I play one on TV.
 
This same SSI is referenced on ever other page on the site. This is the only page having the problem with it.

-Brian-
I'm not an actor, but I play one on TV.
 
Disregard this thread, I discovered that the issue had something to do with having a script component ahead of this element.

-Brian-
I'm not an actor, but I play one on TV.
 
Ah, so it's a JavaScript error.

YOu may wish to try forum216 (JavaScript), and try viewing the page in Firefox - its JS Console is generally more informative than IE for debugging JS errors.

Code:
<a 
  class='menuitem' 
  onmouseover='[COLOR=purple]style.backgroundColor="#264B88", style.color="#FFFFFF"[/color]' 
  onmouseout='[COLOR=purple]style.backgroundColor="#FFFFFF", style.color="#264B88"[/color]' 
  title='PRAPAS - Performance Evaluations' 
  href='[URL unfurl="true"]https://www.prapashr.com/default.asp'[/URL] 
  onclick='[COLOR=purple]window.open(this.href,"newein"); return false;[/color]' 
  onkeypress='[COLOR=purple]window.open(this.href,"newein"); return false;[/color]'>
  Evaluations</a>

The onmouseover/onmouseout look suspect to me (surely each command should be seperated by a semi-colon, not a comma?)

The onmouseover/onmouseout functionality could be done without javascript - using CSS instead:
Code:
a {
  background-color: #ffffff;
  color: #264B88;
}
a:hover { 
  background-color: #264B88;
  color: #ffffff;
}

---
Marcus
better questions get better answers - faq581-3339
accessible web design - zioncore.com
 
For client or server-side JavaScript issues, the best place to go initially is the JavaScript forum (forum216). This forum is for HTML and CSS issues.

Given the title of the thread contains the word "script", and is about a scripting error, not any HTML or CSS errors, I can't see how it ended up here at all!

Hope this helps,
Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top