469,936 Members | 2,444 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,936 developers. It's quick & easy.

How can I use onchange event

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

Jul 19 '05 #1
3 10728
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
Jul 19 '05 #2
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

"Jack" <si*****************@yahoo.co.jp> wrote in message
news:e2**************@TK2MSFTNGP09.phx.gbl...
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

Jul 19 '05 #3
Thank you

Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Asit | last post: by
4 posts views Thread by Zeebra3 | last post: by
3 posts views Thread by b_naick | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.