PDA

View Full Version : Need drop down menu script advice.



Inky1231
09-15-2011, 11:19 PM
1) Script Title:
Halfmoontabs.css, dropdowntabs.js
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex1/droptabmenu.htm (example 5)
3) Describe problem:

I am using this script (copied exactly) to create drop-down menus on a college website and one drop down menu I have has 9 second level items. I want the menu to only go down from the top tab, but right now it goes up and down with the submenu anchored in the middle choice. How do I change this?

Thanks in advanced
Ann

jscheuer1
09-16-2011, 01:53 AM
Please post a link to a page on your site that contains the problematic code so we can check it out.

Inky1231
09-16-2011, 03:17 PM
[divblock]Please post a link to a page on your site that contains the problematic code so we can check it out.[/divblock
sorry at the time I didn't have access to the host server and I had taken the code down earlier in the day. the site I am having problem with is http://www.dacc.edu/student-handbook/advisement.php the drop down menu is with the registration and advisement tab. Any assistance with this would be appreciated. I can't figure out how to get the drop down menu to go all down instead of anchored in the middle.

jscheuer1
09-16-2011, 03:36 PM
Well, hmm - it actually does drop all the way down if there's room for it. On most people's monitors (1024x768 I'm guessing in a .edu setting) full screen or nearly full screen isn't enough. Although, if you scroll the window so that the trigger is nearer to the top, it works OK.

If you make the drop down wider, it should fit on more screens. From the halfmoontabs.css file:


.dropmenudiv_e{
position:absolute;
top: 0;
border: 1px solid #657f27; /*THEME CHANGE HERE*/
border-width: 0 1px;
font:normal 12px Verdana;
line-height:18px;
z-index:100;
background-color: #eff8d2;
width: 200px;
visibility: hidden;
}

Make that like 350px or so.

Or, if you have others that you want to be that narrow, you can probably specify it inline on the page:


<!--1st drop down menu -->

<div id="dropmenu1" class="dropmenudiv_e" style="width:350px;">
<a href="advisement.php">Academic Advisement and Counseling</a>
<a href="#">Academic Records and Transcripts Required for Attendance &amp; Graduation</a>
<a href="#">Course Registration</a>
<a href="#">Online Registration</a>
<a href="#">Class Schedule Changes <br><font size="1">(Drop/Add procedure)</font></a>
<a href="#">Evaluation Process of Coursework from Other Colleges/Universities</a>
<a href="#">Withdrawal Policy at Danville Area Community College</a>
<a href="#">Tuition and Course Fee Refunds</a>
<a href="#">Course Attendance</a>
<a href="#">Student Records/Accounts <font size="1">(Schedules, Bill Statements &amp; Grade Reports) </font></a>
<a href="#">College Catalog</a>
<a href="#">Degree Audits</a> </div>

Below are some other thoughts I had earlier:

We could edit the script so that it drops down no matter what, but then there would be unseen items.

Or we could perhaps add code so that when the trigger is activated, the window scrolls to it, thus giving most folks room enough for it to drop down.

Or you could list less items. Perhaps make two triggers, one for registration and another for advisement, each of which could presumably have less items in its drop down.

Or you could use a different menu like:

http://www.dynamicdrive.com/dynamicindex1/anylinkcss.htm

which allows for columns in the drop down. That way you wouldn't need so much vertical space.

Inky1231
09-16-2011, 07:04 PM
Thank you! That worked great! I am kind of a newbie to scripting with Javascript so I wasn't sure where to fix the issue :D

Inky1231
09-20-2011, 04:58 PM
Ok need some help with this again. Initially the fix worked great but now it's not. I am using a .dwt file to create all the sub pages and nothing changed on that file except editing hyper links, but now the drop down menu is again going up and down and not just down.

Te menu was dropping down below as it should be the whole time until today when editing the last two hyperlinks.

Inky1231
09-20-2011, 05:08 PM
Ok need some help with this again. Initially the fix worked great but now it's not. I am using a .dwt file to create all the sub pages and nothing changed on that file except editing hyper links, but now the drop down menu is again going up and down and not just down.

Te menu was dropping down below as it should be the whole time until today when editing the last two hyperlinks.

Never mind I got it.