![]() |
Javascript from an UserControl
Hi All,
I need to validate fields from my user control in the onload...the problem is that my fields come with the name of the usercontrol followed by textfield's name, for example: UserControl1:TextName I need to validate for example: onload="MyFormatFunction(document.frm1.UserControl 1:TextName.value)"; That returns an error...How do i accomplish that ? -- Please, check my theSpoke: http://www.thespoke.net/MyBlog/dgroh/MyBlog.aspx |
Re: Javascript from an UserControl
Unless you can use the asp.net validation control, it's certainly a little
tricky and messy. I've always done it ala: document.frm1.<%=TextName.ClientId%>.value; Karl -- MY ASP.Net tutorials http://www.openmymind.net/ - New and Improved (yes, the popup is annoying) http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to come!) "Paperback Writer" <newsgroupms@gmail.com> wrote in message news:uXHwYmzcFHA.3912@TK2MSFTNGP15.phx.gbl... > Hi All, > I need to validate fields from my user control in the onload...the problem > is that my fields come with the name of the usercontrol followed by > textfield's name, for example: UserControl1:TextName > > I need to validate for example: > > onload="MyFormatFunction(document.frm1.UserControl 1:TextName.value)"; > > That returns an error...How do i accomplish that ? > > -- > Please, check my theSpoke: > http://www.thespoke.net/MyBlog/dgroh/MyBlog.aspx > |
| All times are GMT. The time now is 11:55 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.