Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

$4.95 Windows Hosting at Webhost4life.com
  Ads  
r2i.ntegrated
 


  Sponsors  

Meet Our Sponsors

R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
Verndale
The Official Microsoft ASP.NET Website
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Javascript Validation and DNN Control Names
Previous Previous
 
Next Next
New Post 7/18/2008 1:39 PM
Resolved
User is offline Bradley Molzen
58 posts
www.vinocellar.com
10th Ranked


Javascript Validation and DNN Control Names 

Hello,

I'm using a client side javascript custom validator so I can get the validation summary(which is also client side) to work correctly.

In my javascript code, I'm trying to use the "name" of the control I'm validating.

However, the "name" will be different on every portal I install the module on because DNN puts it's own naming on the control.

For example, it's calling my checkbox control:

 

dnn_ctr395_InformaticaRequestNew_cbEmergency

Is there a better way to find the control I want to validate, so I don't have to edit the .ascx page for every installation of the module?  (Test, Dev, Prod, etc.)

There are so many controls on this page, that using the index of the control is also quite difficult.

Thanks!

 
New Post 7/18/2008 2:37 PM
Accepted Answer 
User is offline Baatezu
195 posts
9th Ranked


Re: Javascript Validation and DNN Control Names 

use <%= CONTROLNAME.ClientID %> instead of hard coding the value. That should work in most instances of javascript on an aspx page.

I'm not sure your exact situation so it may not work. I've only used the ASP validators, and they do the control name to clientid automatically for me. :)

 
New Post 7/21/2008 9:49 AM
User is offline Mitch Sellers
5712 posts
www.mitchelsellers.com
3rd Ranked




Re: Javascript Validation and DNN Control Names 

The above recommendation is the best way to go.  It will work in all installations without issue.


-Mitchel Sellers
MCITP, MCPD, MCTS
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Consulting Quotes, and DNN Technical Support Services

I reccomend 3Essentials for shared hosting and BaseCamp for project management
 
New Post 7/22/2008 1:16 AM
User is offline Agung Riyadi
100 posts
9th Ranked


Re: Javascript Validation and DNN Control Names 

If you work with external javascript, then you can use this tool : http://code.msdn.microsoft.com/RegClientControls

Nice tool.

HTH.

 
New Post 7/22/2008 1:08 PM
User is offline Bradley Molzen
58 posts
www.vinocellar.com
10th Ranked


Re: Javascript Validation and DNN Control Names 

Thanks everyone for the replies.   This worked perfectly.... 

Example for my checkbox:

document.form.<%=cbEmergency.ClientID%>.checked

 

 1 Reports
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Javascript Validation and DNN Control Names
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DotNetNuke Web Hosting w/ ASP.NET 3.5
Unlimited email boxes, Unlimited databases, Unlimited domains. Plans start at $4.97
www.MyWinHosting.com
SteadyRain
Founded in 1999, SteadyRain has extensive experience delivering Internet technology strategies and solutions for a diverse client base, ranging from Fortune 500 firms to successful start-ups.
www.steadyrain.com
AfterImage Internet Consulting and SEO Services
AfterImage provides search engine optimization (SEO), Internet consulting and hosting services for the Windows platform (IIS, ASP, SQL Server).
www.afterimage.nl/

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP