Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pull-down menus on control page

Status
Not open for further replies.

occas

Technical User
Jan 14, 2004
164
US
i would like to be able to have a pull-down menu on a control page. i am looking at javascript that will do this. problem i see is that when i use tags such as <head>, <body>, etc. on a control page, when validating at w3.org, it will show dual tags on the pages being called. i am a tad confused here. ty.
 
I am a bit confused on what you mean by a control page?? do you mean a user control? if it is then you should not have and tags like <head><html><body> both opening and closing. the reason is that when you import this control the page already contains these tags!

Sorry if i have missed what you meant.

Rob
 
sorry. yes, i use a control page for a side menu. i want to be able to have a user hover a link on the left side and get a dropdownlist of choices to navigate. i am looking at some javascript to do this. haven't got it working but still looking. ty.
 
i wonder if anyone has used a control page for a pull-down menu?
i am trying 2 control pages. first one i have placed in my page <head> section:
<code>
<%@ Control Language=&quot;VB&quot; %>
<script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;>
<!--


stdBrowser = (document.getElementById) ? true : false
function toggleMenu(currElem,nextPos) {
menuObj= (stdBrowser) ? document.getElementById(currElem).style : eval(&quot;document.&quot; + currElem)
if (toggleMenu.arguments.length == 1 {
nextPos = (parseInt(menuObj.top) == -5) ? -90 : -5
}
menuObj.top = (stdBrowser) ? nextPos + &quot;px&quot; : nextPos
}
-->
</script>
</code>
the second control page is in the <body> section:
<code>
<%@ Control Language=&quot;VB&quot; %>


<div id=&quot;mainMenu&quot; class=&quot;menu&quot; onmouseover=&quot;toggleMenu('searchMenu', -5)&quot; onmouseout=&quot;toggleMenu('searchMenu', -90)&quot;><br />
<a href=&quot; />
<a href=&quot; />
<a href=&quot; />
<a href=&quot; />
<a href=&quot; />
<a href=&quot;javascript:toggleMenu('mainMenu')&quot;>main</a>
</div>
</code>
i have .menu declared in my maincss.css file. i get the links to appear where i want them on the left margin. but not in a pull-down fashion. they are lined up as in a regular menu. all links are visible when you load the page.
any help tyvm.
 
you could look at the solpart menu for this as well. I believe it's free
 
i've done searches for solpart menu. even at their website, can't really find anything too specific. but will keep looking. may still try getting the javascript to work. ty.
 
just for the heck of it, i tried the following code, straight from the text i have. it results in the same thing. no pull-down menu with &quot;error on page&quot; in status bar. details of error are object expected line 30, column 1. i know it's a javascript error but not why. i will post the code. one other question. the # symbol in the <style> section i have not seen before.
i have also tried the postion:absolute in the <style> section. all that does is put the menu so far up the screen i can't see it all.
tyvm.
<code>
<!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;<html xmlns=&quot;<head>
<title>My Pull-down Menu</title>
<script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;>
<!--


stdBrowser = (document.getElementById) ? true : false
function toggleMenu(currElem,nextPos) {
menuObj= (stdBrowser) ? document.getElementById(currElem).style : eval(&quot;document.&quot; + currElem)
if (toggleMenu.arguments.length == 1 {
nextPos = (parseInt(menuObj.top) == -5) ? -90 : -5
}
menuObj.top = (stdBrowser) ? nextPos + &quot;px&quot; : nextPos
}
-->
</script>
<style type=&quot;text/css&quot;>
<!--
.menu {font: 12pt Times New Roman,serif; background-color:#aead99; layer-background-color:#aead99;top:-90px}

#mainMenu {left:10px; width:70px;}
a {text-decoration:none; color:black}
a:hover {background-color:navy; color:white}
-->
</style>
<body bgcolor=&quot;white&quot;>
<div id=&quot;mainMenu&quot; class=&quot;menu&quot; onmouseover=&quot;toggleMenu('mainMenu', -5)&quot; onmouseout=&quot;toggleMenu('mainMenu', -90)&quot;><br />
<a href=&quot; />
<a href=&quot; />
<a href=&quot; />
<a href=&quot; />
<a href=&quot; />
<a href=&quot;javascript:toggleMenu('mainMenu')&quot;>Main</a>
</div>
</code>

</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top