LondonBoy
04-10-2007, 03:49 PM
ok this code, I got a href link that works with a counter for the value in a javascript variable, i put that value in a hidden field, then assign that value to a javascript variable.
But it's not working, can anyone help me?
Loccustom=request.form("custom")
<input type="hidden" name="custom" value="" />
</form>
var global=0;
function dynamic()
{
var tmp=1;
global=global+tmp;
alert(tmp)
alert(global)
document.frm.custom.value=global;
}
<% if len(Loccustom)=0 then
else%>
<tr>
<td height="15" colspan="3" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="244" height="15" align="center" valign="middle"><!--DWLayoutEmptyCell--> </td>
<td width="168" align="center" valign="middle"><!--DWLayoutEmptyCell--> </td>
<td width="163" align="center" valign="middle"><!--DWLayoutEmptyCell--> </td>
</tr>
</table>
</td>
</tr> <%end if%>
<tr>
<td height="15" colspan="3" valign="middle"> <a href="javascript:dynamic();">Click here to add charges not in selection</a></td>
</tr>
But it's not working, can anyone help me?
Loccustom=request.form("custom")
<input type="hidden" name="custom" value="" />
</form>
var global=0;
function dynamic()
{
var tmp=1;
global=global+tmp;
alert(tmp)
alert(global)
document.frm.custom.value=global;
}
<% if len(Loccustom)=0 then
else%>
<tr>
<td height="15" colspan="3" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="244" height="15" align="center" valign="middle"><!--DWLayoutEmptyCell--> </td>
<td width="168" align="center" valign="middle"><!--DWLayoutEmptyCell--> </td>
<td width="163" align="center" valign="middle"><!--DWLayoutEmptyCell--> </td>
</tr>
</table>
</td>
</tr> <%end if%>
<tr>
<td height="15" colspan="3" valign="middle"> <a href="javascript:dynamic();">Click here to add charges not in selection</a></td>
</tr>