You must Sign In to post a response.

onchange event in vbscript

I am trying to call an asp function when a user changes a textbox field. The
code looks something like this:


<% @LANGUAGE =VBSCRIPT %>


<% Option Explicit %>


<HTML>


<HEAD>


<TITLE>Sample Form</TITLE>


</HEAD>


<% Function CheckUsername(UName)


................. CODE
End Function %>


<TABLE>


HTML TEXT........


<INPUT TYPE=text NAME="UName" VALUE="" size="25"
ONCHANGE="CheckUsername(this.form.UName)">


</TABLE>


</HTML>


Now when I display the page, and change the UName value, I get an error
message that says: " Object Expected"


Any help is appreciated.


Comments

#98904    Author: Kavitha    07 Dec 2006 Member Level: Gold   Points : 2

Hi
Try this
<INPUT TYPE=text NAME="UName" VALUE="" size="25"
onChange="CheckUsername(this.form.UName)">

'onChange - case sensitive


Regards
NK


This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.