how to use javascript in Datalist Question?

G

Guest

I have a href link in a Datalist

<a href="addtocart.aspx" onmouseover="void
validateNumericField(document.Form1.txtphone);" onkeyup="jump();" >

I'm trying to validate a TextBox with Id ="txtphone" as above
The TextBox is also in a Datalist.

I have declared the textbox in the OnItemDataBound of the DataList like so:-
Dim txt As TextBox = CType(e.Item.FindControl("txtphone"), TextBox)

But my Javascript isn't firing it seems its not seeing the right ID's

Any Ideas what 'm doing wrong?





But ites not working?
 

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,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top