![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.javascript archiveRe: Switch() Statement Not Working
From: web.dev <web.dev.cs@gmail.com>
Date: Tue Jan 31 2006 - 21:04:30 CET
rdavis7408@gmail.com wrote:
The language attribute is deprecated, use the type attribute instead:
<script type = "text/javascript">
> b=this.form.ppg.value
This statement is error-prone. Instead give your form a name and
var b = document.forms["formName"].elements["ppg"].value;
> switch(b)
1. It is not 'Case', but should be 'case' with a lowercase C.
var dintVal = .99;
if(b >= 1.25 && b <= 1.3)
document.forms["formName"].elements["dInt"].value = dintVal;
|