Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Accessing web objects and ASP objects from JavascriptAccessing web objects and ASP objects from Javascript
Previous
 
Next
New Post
2/20/2007 2:35 PM
 

I know how to add a reference to a javascript file in a DNN module but I seem to be missing the correct syntax to be able to refer to a web object or ASP control directly in my module. On a regular ASP page, you just refer to the control by name. There's obviously some kind of framework call I need to make in DNN to find the correct control.

For example: Let's say I have a checkbox named "CheckBox1". How do I refer to this control in my DNN module from a javascript file?

thanks,

 

russ...

 
New Post
2/20/2007 3:44 PM
 

via regular javascript...

document.getElementById(checkboxId)

via DNN JS framework...

read the ClientAPI documentation in the DNN docs downloadable package.

 


Thanks,
Vladan Strigo
NETMedia

My website: Vladan.Strigo.NET

Vladan.Strigo.NET: Projects
* Advanced VS2005 development approach - BlankModule
* DNN & Microsoft Ajax best practices guidance

Vladan.Strigo.NET: Resources
* Comprehensive list of DNN 4 Module development resources

 
New Post
2/20/2007 5:49 PM
 
I read the ClientAPI documentation and got confused. I was looking for some clarification.
 
New Post
2/21/2007 1:13 PM
 

Assuming the control is a server-side control, you reference it on the server and access it's UniqueID property.  Checkbox1.UniqueID.

If you need access to a lot of controls on the client, you can sometimes just send down the NamingContainer's UniqueID down and append it to id your are looking for on the client.

document.getElementById(m_sNS + 'CheckBox1');

 


 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Accessing web objects and ASP objects from JavascriptAccessing web objects and ASP objects from Javascript


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out