[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

javascript errors; help with debugging a simple script



hi there

the following script generates an error that reads ".... line 28 is not a 
number" when the functions are called. since i can't figure out where 
line 28 is (how does javascript count line numbers, anyway?), and the 
script looks okay to me, what's wrong? please respond ASAP.

function goBack()
{
if (parent.right.history.go(-1) == null)
  alert("You haven't gone anywhere yet")
else (parent.right.history.go(-1))
}

function goForward()
{
if ((parent.right.history.go(1) == null) && (parent.location.right 
=="intro.html"))
  parent.location.right="concept.html"
else (parent.right.history.go(1))
}

which is used in two buttons

<input type="button" value="Back" onClick="goBack()">
and
<input type="button" value="Forward" onClick="goForward()">
--------------------------------------------------------------------
This message came from the mailing list javascript. For help using the
mailing list software, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.