S
Simon
Am using the following code.
<script language="JavaScript1.2">
function setquantity(productindex,productquantity)
{
//create the reference object
irefname_none = eval("document." + productindex + "none");
<snip>
and set quantity is called as follows further on in the HTML
<snip>
<td><img style="filter:alpha(opacity=20);-moz-opacity:0.2"
name="1_none" src="none.gif" onclick="setquantity('1','none')" /></td>
<snip>
when I run this, the javascript console shows me an error as follows
Error Missing ; before statement
Line 9
document.1none
Line 9 is the eval line. As a test, if I remove the productindex from
the eval statement it works fine, so doesn't seem to like
productindex, despite a string being passed.
Any suggestions appreciated. Testing and developing this on Mozilla
1.2.1, Linux
Regards
Simon
<script language="JavaScript1.2">
function setquantity(productindex,productquantity)
{
//create the reference object
irefname_none = eval("document." + productindex + "none");
<snip>
and set quantity is called as follows further on in the HTML
<snip>
<td><img style="filter:alpha(opacity=20);-moz-opacity:0.2"
name="1_none" src="none.gif" onclick="setquantity('1','none')" /></td>
<snip>
when I run this, the javascript console shows me an error as follows
Error Missing ; before statement
Line 9
document.1none
Line 9 is the eval line. As a test, if I remove the productindex from
the eval statement it works fine, so doesn't seem to like
productindex, despite a string being passed.
Any suggestions appreciated. Testing and developing this on Mozilla
1.2.1, Linux
Regards
Simon