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, ...Setting internal page link ("scroll to top") does not workSetting internal page link ("scroll to top") does not work
Previous
 
Next
New Post
3/12/2009 12:31 AM
 

In my main container - as I guess in most cases it will include much content - I would like to add a little link at the bottom which scrolls up to the top of the container:

<a name="container_top"></a>
<table id="container" cellpadding="0" cellspacing="0" >
    ...
    <a href="#container_top">Go to top</a>

...
</table>

But when DNN compiled the page into ASCX, this happens (which of course leads into nowhere but a directory listing):

<a href="/mtha_intranet/portals/_default/containers/mtha/#container_top">Go to top</a>
 
New Post
3/12/2009 3:38 AM
 

Use javascript instead:


 

except replace the space after the quote with "javascript" followed by a colon, so it is"javascript : scroll" with no spaces before or after the colon. This forum editor keeps removing the word javascript as a security measure even in a textarea.

This has worked in html based skin design for me before.


JOHN GIESY
DotNetNuke Hosting Expert

DotNetNuke 7 Hosting $70 /year
DNN4Less.com Team DotNetNuke  

New Post
3/12/2009 4:44 AM
 

Thanks Rick, but I do not want to use JavaScript because of two reasons: Some users might have JS disabled. Furthermore I uses this in a container and do not want to scroll to (0,0) (so the top of the whole site) but to the top of the container. A scroll(0,0) could be better used in the footer of the skin so at the end of every page.

EDIT: Decided to use a JavaScript solution unless there will be no other possibility. To scroll to the anchor instead of scrolling to (0,0) you can use this:

<script type="text/javascript">
    function showIt(elID)
    {
      var el = document.getElementById(elID);
      el.scrollIntoView(true);
    }
  </script>

<a href=" showIt('container_top')">To top</a>

 
New Post
3/12/2009 3:17 PM
 

The skin parser will add the skin path to every href in the HTML skin.

I think you can fool it by adding this:

<a hre<%=""%>f="#container_top">Go to top</a>

ASP.NET will replace the <%=""%> with nothing, but the link will not work in the HTML skin itself anymore...

(it will in the ASCX)

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Setting internal page link ("scroll to top") does not workSetting internal page link ("scroll to top") does not work


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