I am attempting to populate a button dynamically using VBScript and call a JavaScript function from it passing a parameter (I'd like to pass 2). Here's what I have:
WriteLn ("<td nowrap class=""ContentActionSmall"">
<input type='button' name='VeiwReport' value='VIEW REPORT'
onclick='jsfunction()'> </td>"
This is a static call to the jsfunction:
function jsfunction(lnk)
{
alert("fx called V0.4 "+lnk);
go_pop_upA("/aa/rpt/detailedReport_go.asp");
}
This part also works. But it is static. I need to pass a variable inside the onclick='jsfunction()
like this:
WriteLn ("<td nowrap class=""ContentActionSmall"">
<input type='button' name='VeiwReport' value='VIEW REPORT'
onclick='jsfunction(TOPIC_ID)'> </td>"
When I do this, jsfunction
does not execute.
I've tried a number of things, including calling a VBScript Function or sub with the VB functions and subs not executing (calling jsfunction)
The goal is to open another page with the TOPID_ID and another string passed to the new page, which will be a popup window the user can close. So the above code, which was mostly in place when I started, does not have to remain the same.