Forums

This topic is locked

JS Scripting Error...Can You Help?

Posted 24 Sep 2003 23:41:31
1
has voted
24 Sep 2003 23:41:31 Katherine Williams posted:
I'm getting the following error message when it comes to a simple script:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Internet Explorer Script Error
An error occurred in the script on this page.
Line: 200
Char: 38
Error: Object expected <b>OR</b> Object doesn't support property or method
Code: 0
URL: dgitsrv1/Releases/Commission/RTE_Files/richedit.html

Do you want to continue running scripts on this page?
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

This is the Javascript that's giving the error:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
function cancel()
{
var button = confirm("If you are sure that you want to quit, click 'OK'. Otherwise click 'CANCEL'."
if (button == true)
{
javascript:history.back()
}}
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

The error message is referencing the line about going back a page if the 'OK' button is pressed. It works fine if 'CANCEL' is pressed. I've also tried changing javascript:history.back() to history.go(-1), but it still doesn't work. I've used this function on several other parts of the site with success, so I don't know why it's not working properly. Any & all help is appreciated.

KWilliams

Reply to this topic