Hi
What I'm trying to do is simple for jscript, but I need to use vbscript.
In a web page, I've got essentially a control array which I generate from server side code. I can get the server side code to include the onclick="MySub" attribute for each element, and I know how to make the sub obtain a reference to the control which was clicked, thus kinda getting the functionality of a control array.
But it doesn't work. For example, this produces an error "Object doesn't support this property or method" when a button is clicked. Does anyone have any suggestions?
Mark![[openup] [openup] [openup]](/data/assets/smilies/openup.gif)
What I'm trying to do is simple for jscript, but I need to use vbscript.
In a web page, I've got essentially a control array which I generate from server side code. I can get the server side code to include the onclick="MySub" attribute for each element, and I know how to make the sub obtain a reference to the control which was clicked, thus kinda getting the functionality of a control array.
But it doesn't work. For example, this produces an error "Object doesn't support this property or method" when a button is clicked. Does anyone have any suggestions?
Code:
<HTML>
<body >
<form name="Form1">
<div id="Panel1">
<button onclick="MySub">0</button><button onclick="MySub">1</button><button onclick="MySub">2</button>
</div>
</form>
</body>
<script language=vbscript>
sub MySub
msgbox "Hello"
end sub
</script>
</HTML>
Mark
![[openup] [openup] [openup]](/data/assets/smilies/openup.gif)