Run Time Error. Expected ';'
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Run Time Error. Expected ';'

From: <andy.herrera@gmail.com>
Date: Tue Jul 26 2005 - 06:40:26 CEST

I'm getting this Error Message. Expected ';'

Please Select One:
<form name="form1"> <<------------ Error is here.
        <select name="selectTrans" onChange="If (this.value == 'checkout')
window.location.href='CheckOut.php';">
      <option>---Please Select One ---</option>
      <option value="checkout">Check OUT</option>
      <option value="checkin">Check IN</option>
    </select>
</form>

What looks wrong with the above code? I did it this way because I was
getting the same error (Expected ';' error) with the code below....
<head>
        <script language="JavaScript" type="text/javascript">

        function deil(ans)
        { <<<-----------------------error here
                  If (ans == "checkout") {
                          window.location.href="CheckOut.php";
                  }
        }
      ..... more functions here...
        </script>
</head>
.
.
.
Please Select One:
<form name="form1">
        <select name="selectTrans" onChange="HereWeGo();">
      <option>---Please Select One ---</option>
      <option value="checkout">Check OUT</option>
      <option value="checkin">Check IN</option>
    </select>
</form>

I've spent hours trying to figure this out and I still can't get it to
work!!! Does anyone know what is going on? It looks good to be but
obviously it's not.

Thanks in advance!!! no, really :-)

Andy
Received on Tue Oct 18 03:01:35 2005