How can I use onchange event

J

Jack

Hello,
I wrote this code:
<%@ Language=VBScript %>
<%
Response.Write "<SELECT id=Customer name=Customer
onchange=""text152='abc'"">"
Response.Write "<OPTION value=1>One"
Response.Write "<OPTION value=2>Two"
Response.Write "<OPTION value=3>Three"
Response.Write "</SELECT>"
Response.Write "<BR>"
Response.Write "<INPUT type=""text"" id=text152 name=text152>"
Response.Write "<BR>"
%>

But change the SELECT,onchange event not been called
Can you help me
 
B

Bhaskardeep Khaund

Hi,

Create a JavaScript function and then call the function on the OnChange event. Like

<select id="customer" name="customer" onChange="javascript:fnDoSomething()">

Where fnDoSomething() is the name of your JavaScript function.

Regards,
Bhaskardeep Khaund
 
R

Ray at

This isn't an ASP issue, as onchange is a client-side event. Try asking in
client-side scripting group such as .scripting.jscript.

Ray at work
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top