Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > how to use javascript in Datalist Question?

Reply
Thread Tools

how to use javascript in Datalist Question?

 
 
=?Utf-8?B?UGF0cmljay5PLklnZQ==?=
Guest
Posts: n/a
 
      06-28-2005
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?



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Entering DataList EditItemTemplate from Outside of the DataList Luis Esteban Valencia ASP .Net 1 01-06-2005 07:32 PM
Setting up a datalist control - Item_DataBound for a datalist in a datalist Nevyn Twyll ASP .Net 8 09-09-2004 10:13 PM
Click event in a datalist to post back datalist properties Steve Lloyd ASP .Net 1 05-26-2004 04:07 AM
DataList in DataList acko bogicevic ASP .Net 2 11-11-2003 08:31 AM
Datalist in Datalist How? Gönen EREN ASP .Net 0 08-22-2003 02:41 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57