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

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Flash and Javascript sets DIV visibilityFlash and Javascript sets DIV visibility
Previous
 
Next
New Post
5/26/2007 9:27 PM
 

Hey Timo. Can you post your code so I can try and see if there's something I missed? Maybe it has something to do with the skinpath. Thanks!

 
New Post
5/26/2007 10:10 PM
 

While it's possible that there may be an issue with paths, I think it's secondary. The problem I see immediately upon scanning your code is that you are referring to DOM ID's of elements that do not exist. When you have an element with an id of "XYZ" and you add the runat="server" attribute to this element, then you can no longer rely on that element's DOM ID being "XYZ" any more. This is because the DOM ID is dynamically created by the ASP.net engine based on the hierarchical location of that element within all other server-rendered HTML elements.

The correct way to obtain a handle on such elements is to use the server-side .ClientID property. Your JS needs to be modified so it reads like this:

function showLayer(lyr)
{
    var eId = "";
    switch(lyr)
   {
         case "contactus" : eId = "<%= contactus.ClientID %>"; break;
         case "portfolio" : eId = "<%= portfolio.ClientID %>"; break;
   } 

   hideLayer(currentLayer);
   document.getElementById(eId).style.visibility = 'visible';
   currentLayer = eId;
}

Nik

 

 


Nik Kalyani
Co-founder
DotNetNuke Corporation
Blog | Twitter | FaceBook
 
New Post
5/27/2007 2:32 AM
 

Wow, thanks Nik. That sounds like it would certainly make a difference. I will try it tomorrow when I am bright eyed.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Flash and Javascript sets DIV visibilityFlash and Javascript sets DIV visibility


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