Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Attributes.Add with a onclick text box

Status
Not open for further replies.

slatet

Programmer
Sep 11, 2003
116
0
0
US
Does anyone know if this is doable? ANd if it is, what is wrong with this line.

Textbox.Attributes.Add("onclick", "Procedure(value);");

I'm getting an "error on page" on the page status bar when I click on this field.

Thanks in advance.
 
Do you have the function "Procedure" written in javascript or VB script in your HTML? Double click the icon in the status bar, it will show a pop up with error details.

Jim
 
Its written in C#. I did do that but the error message doesn't help me. Its saying object expected on an HTML line that I find nothing wrong with.
 
Adding an attribute like that means that it will call a "Client Side" script, which you need to provide with a scripting language such as javascript or vbscipt.

Jim
 
Its saying object expected on an HTML line that I find nothing wrong with.
And do you have a function named Procedure that accepts an parameter named value on your page?


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top