|
this page bring me that error: missing ; before statement
what`s wrong?
here`s the code
<html>
<head>
<title>new page</title>
<SCRIPT LANGUAGE="Javascript">
function test(par)
{
alert(eval("document.formu." + par + "qtt.value"));
}
</SCRIPT>
</head>
<body>
<form name=formu>
<p><input type="text" name="1qtt" size="20"><input type="button" value="Button 1" name="B1" onclick=test("1")></p>
<p><input type="text" name="2qtt" size="20"><input type="button" value="Button 2" name="B2" onclick=test("2")></p>
</form>
</body>
</html>
|
|
|
I played with it for a couple minutes, and I`m not sure how to use the Eval statement and not get that error, but I always take the easy way out, and here is one easy way out:
alert(document.formu.elements[par + "qtt"].value);
|
|
|
|
|
Althrough i can't help you solve the problom, you can try it carefully, i believe you will find the mistake which you made!
------------------------------------------------------------ flash banner|logo maker|flash menu|drop down menu
|
|
|
|
|
|
|
|