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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can somebody help

Status
Not open for further replies.

yeagly21

Programmer
Dec 11, 2003
23
US
Hello All, below is some javascript that I am currently running in an ASP application. I continue to get a runtime error saying expected ; near my return statement. Can anyone see what it might be. Thanks in advance.

if (intSlots[j] == "1")
{
if (document.dentry.alertGiven.value == "n")
{
alert ("A time that was entered is between another shift. Please correct this.")
document.dentry.alertGiven.value = "y"
}
j = 100
i = 100
return 0

} else {
intSlots[j] = 1
}
 
Javascript has some of the same rules as C. You need semi-colons at the end of some of the lines of code.
Code:
if (intSlots[j] == "1") 
{
    if (document.dentry.alertGiven.value == "n")
    {
      alert ("A time that was entered is between another shift.  Please correct this.")[red];[/red]
      document.dentry.alertGiven.value = "y"[red];[/red]
    }
    j = 100[red];[/red]
    i = 100[red];[/red]
    return 0[red];[/red]

} else {
    intSlots[j] = 1[red];[/red]
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top