vbscript Event parameters

J

jose.mendez22

I have created a label ctl and an OnClick event handler which works
correclty. However I would also like to pass the event two parameters
so I cand do further logic. Does anyone know the syntax to pass the
event parameters?


<SCRIPT LANGUAGE="vbscript" FOR="lnkEdit" EVENT="OnClick">
MsgBox("TESTING...eidt")
</SCRIPT>


<label ID=""lnkEdit"">


Thanks in advance for any input
 
B

Bob Barrows [MVP]

I have created a label ctl and an OnClick event handler which works
correclty. However I would also like to pass the event two parameters
so I cand do further logic. Does anyone know the syntax to pass the
event parameters?


<SCRIPT LANGUAGE="vbscript" FOR="lnkEdit" EVENT="OnClick">
MsgBox("TESTING...eidt")
</SCRIPT>


<label ID=""lnkEdit"">
In the future, client-side scripting questions should be posted to a
client-side scripting newsgroup such as microsoft.public.scripting.vbscript.
ASP is server-side technology so client-side questions will not get the
attention they will get in a newsgroup where they are on topic.

Where are the parameter values coming from? Try this:

<div id="lnkEdit" Language="vbscript" onclick="lnkEdit_onclick(1,'A')">click
here</div>

<script type="text/vbscript">
sub lnkEdit_onclick(parm1, parm2)
msgbox parm1,,parm2
end sub
</script>

Please follow up in a client-side scripting newsgroup if you have any
further questions.

Bob Barrows
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top