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, ...how can i make this change in menuhow can i make this change in menu
Previous
 
Next
New Post
7/15/2009 3:42 AM
 

hi i need to change the menu to be Horizontal Scrolling i found javascript code to do this but it is not working good when i add the DNNNAV controll

my code is

//configure path for left and right arrows

var

goleftimage='pointer2.gif'

var

gorightimage='pointer.gif'

//configure menu width (in px):

var

menuwidth=300

//configure menu height (in px):

var

menuheight=25

//Specify scroll buttons directions ("normal" or "reverse"):

var

scrolldir="normal"

//configure scroll speed (1-10), where larger is faster

var

scrollspeed=6

//specify menu content

var

 

menucontents='<nobr><div><dnn:NAV runat="server" id="dnnNAV" ProviderName="DNNMenuNavigationProvider" IndicateChildren="false" ControlOrientation="Horizontal" CSSControl="mainMenu" Level="2" /></div></nobr>';

////NO NEED TO EDIT BELOW THIS LINE////////////

var

iedom=document.all||document.getElementById

var

leftdircode='onMouseover="moveleft()" onMouseout="clearTimeout(lefttime)"'

var

rightdircode='onMouseover="moveright()" onMouseout="clearTimeout(righttime)"'

if

(scrolldir=="reverse"){

var

leftdircode=rightdircode

rightdircode=tempswap

}

tempswap=leftdircode

if

document.write(

(iedom)'<span id="temp" style="visibility:hidden;position:absolute;top:-100;left:-5000">'+menucontents+'</span>')

var

actualwidth=''

var

cross_scroll, ns_scroll

var

loadedyes=0

function

fillup(){

if

cross_scroll=document.getElementById? document.getElementById(

cross_scroll.innerHTML=menucontents

actualwidth=document.all? cross_scroll.offsetWidth : document.getElementById(

}

(iedom){"test2") : document.all.test2"temp").offsetWidth

else

ns_scroll=document.ns_scrollmenu.document.ns_scrollmenu2

ns_scroll.document.write(menucontents)

ns_scroll.document.close()

actualwidth=ns_scroll.document.width

}

loadedyes=1

}

window.onload=fillup

if (document.layers){

function

moveleft(){

if

(loadedyes){

if

cross_scroll.style.left=parseInt(cross_scroll.style.left)-scrollspeed+

(iedom&&parseInt(cross_scroll.style.left)>(menuwidth-actualwidth)){"px"

}

else

ns_scroll.left-=scrollspeed

}

lefttime=setTimeout(

}

if (document.layers&&ns_scroll.left>(menuwidth-actualwidth))"moveleft()",50)

function

moveright(){

if

(loadedyes){

if

cross_scroll.style.left=parseInt(cross_scroll.style.left)+scrollspeed+

(iedom&&parseInt(cross_scroll.style.left)<0)"px"

else

ns_scroll.left+=scrollspeed

}

righttime=setTimeout(

}

 

if (document.layers&&ns_scroll.left<0)"moveright()",50)

if

(iedom||document.layers){

with

write(

write(

write(

(document){'<table border="0" cellspacing="0" cellpadding="2">')'<td valign="middle"><a href="#" '+leftdircode+'><img src="'+goleftimage+'"border=0></a> </td>')'<td width="'+menuwidth+'px" valign="top">')

if

write(

write(

write(

}

(iedom){'<div style="position:relative;width:'+menuwidth+'px;height:'+menuheight+'px;overflow:hidden;">')'<div id="test2" style="position:absolute;left:0;top:0">')'</div></div>')

else

write(

write(

}

write(

write(

write(

write(

}

}

if (document.layers){'<ilayer width='+menuwidth+' height='+menuheight+' name="ns_scrollmenu">')'<layer name="ns_scrollmenu2" left=0 top=0></layer></ilayer>')'</td>')'<td valign="middle"> <a href="#" '+rightdircode+'>')'<img src="'+gorightimage+'"border=0></a>')'</td></table>')

 
New Post
7/19/2009 4:47 AM
 

any help please

 
New Post
7/19/2009 6:02 AM
 

I wouldn't try to modify an existing menu, use a 3rd party menu (with DNN provider) instead, which includes this feature


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
7/20/2009 1:31 AM
 

do you have an example or URL or any suggistin

 
New Post
7/20/2009 4:00 AM
 

Try to set scroll bar to div and place NAV control inside div. But that will standard scroll bars like browse we have

<div style="overflow:auto; height:556px;width:200px;">

dnn:NAV runat="server" id="dnnNAV" ProviderName="DNNMenuNavigationProvider" IndicateChildren="false" ControlOrientation="Horizontal" CSSControl="mainMenu" Level="2" />

<div>

Change  Height and width as you desired

 


Leo TechnoSoft Pvt.Ltd - The Biggest DotNetNuke Development Team
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...how can i make this change in menuhow can i make this change in menu


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