Go Back   Dynamic Drive Forums > DD Scripts > Dynamic Drive scripts help
Search Dynamic Drive Forums:

Reply
 
Thread Tools Search this Thread
  #1  
Old 06-09-2005, 07:55 AM
nicoldreamlover nicoldreamlover is offline
Junior Coders
 
Join Date: May 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default AnyLink Drop Down Menu Problems

Hi,

Currently I am using this script to display a drop down menu onClick upon user onClick a button. The problem now is in IE, the menu will hide behind combo drop down. I am attaching an image for easy visualization for you all.

One more issue, can we kind of "force" the menu to drop down in one way, in this case, i want it to drop down on the bottom way instead of showing on top of the button when the browser's space is limited on the bottom part.

Thanks for your help!
Attached Thumbnails
Click image for larger version

Name:	Problem.JPG
Views:	1091
Size:	18.3 KB
ID:	103  
Reply With Quote
  #2  
Old 06-10-2005, 02:42 AM
nicoldreamlover nicoldreamlover is offline
Junior Coders
 
Join Date: May 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is there somebody helping on this?
Reply With Quote
  #3  
Old 06-10-2005, 06:15 AM
jscheuer1's Avatar
jscheuer1 jscheuer1 is offline
No Kidding?
 
Join Date: Mar 2005
Location: SE PA USA
Posts: 18,997
Thanks: 19
Thanked 1,132 Times in 1,118 Posts
Blog Entries: 3
Default

Are those form boxes? If so, the best work around is to have them become invisible while the menu is dropping down.
__________________
WWWWWWWWWWWW
- John
________________________

Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Reply With Quote
  #4  
Old 06-27-2005, 06:53 AM
che_rish che_rish is offline
Junior Coders
 
Join Date: Nov 2004
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jscheuer1
Are those form boxes? If so, the best work around is to have them become invisible while the menu is dropping down.
Hello! I'm having the same problem. I wonder how do I do what you suggested? Should I use onmouse event w/ the form boxes??
Reply With Quote
  #5  
Old 06-27-2005, 07:13 AM
jscheuer1's Avatar
jscheuer1 jscheuer1 is offline
No Kidding?
 
Join Date: Mar 2005
Location: SE PA USA
Posts: 18,997
Thanks: 19
Thanked 1,132 Times in 1,118 Posts
Blog Entries: 3
Default

Have a look at this post and the thread it is in. A slightly different script but, the same solution. Let me know if you have more questions.

http://www.dynamicdrive.com/forums/s...ad.php?p=11343
__________________
WWWWWWWWWWWW
- John
________________________

Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Reply With Quote
  #6  
Old 06-27-2005, 08:32 AM
che_rish che_rish is offline
Junior Coders
 
Join Date: Nov 2004
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jscheuer1
Have a look at this post and the thread it is in. A slightly different script but, the same solution. Let me know if you have more questions.

http://www.dynamicdrive.com/forums/s...ad.php?p=11343
Hello! Thanks so much for your quick reply. I'm not really that good w/ javascript and I'm not sure where to apply the script in that link you gave me. I did try to put it in the following line:

HTML Code:
//Contents for Management:
var menu5=new Array()
menu5[0]='<ul><li><a href="view_users.php" class="menuskin">.: View Users</a></li></ul>'
menu5[1]='<ul><li><a href="add_user.php" class="menuskin">.: Add User</a></li></ul>'
menu5[2]='<ul><li><a href="work_log.php" class="menuskin">.: Staff Work Report</a></li></ul>'
menu5[3]='<ul><li><a href="upload_file.php" class="menuskin">.: Upload File</a></li></ul>'
menu5[4]='<ul><li><a href="view_uploads.php" class="menuskin">.: View Uploaded Files</a></li></ul>'


var menuwidth='165px' //default menu width
var menubgcolor='#ccc'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
// Original script:
//document.write('<div id="menuskin" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

// Applying your suggestion: 
document.write('<div id="menuskin" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="if (document.all&&!window.opera){document.all('category').style.visibility='hidden'};clearhidemenu()" onMouseout="dynamichide(event);if (document.all&&!window.opera){document.all('category').style.visibility='visible'};"></div>')
(Please take note on the "Applying your suggestion" comment in the last few lines).

I'm pretty sure I'm doing something wrong because the dropdown is still showing behind the <select> tag.
Reply With Quote
  #7  
Old 06-27-2005, 09:23 AM
jscheuer1's Avatar
jscheuer1 jscheuer1 is offline
No Kidding?
 
Join Date: Mar 2005
Location: SE PA USA
Posts: 18,997
Thanks: 19
Thanked 1,132 Times in 1,118 Posts
Blog Entries: 3
Default

If it is only one drop box named 'category' you are hiding, this method will work well - find this line in the script:
Code:
function dropdownmenu(obj, e, menucontents, menuwidth){
Put this line right below it:
Code:
if (document.all&&!window.opera){document.all('category').style.visibility='hidden'};
Then find this line:
Code:
function hidemenu(e){
Put this line right below it:
Code:
if (document.all&&!window.opera){document.all('category').style.visibility='visible'};
Leave everything else the way it was before you made the changes reported in your above post.
__________________
WWWWWWWWWWWW
- John
________________________

Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Reply With Quote
  #8  
Old 06-29-2005, 06:49 AM
che_rish che_rish is offline
Junior Coders
 
Join Date: Nov 2004
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello jscheuer1!

First of all thanks for your time in helping me with this problem. Really appreciate it.

I tried your suggestion. However, the "anylink dropdown" menu would not show at all. Here's the web page so you can see:

1) Before applying your suggestion: http://admin.saipanmall-net.com/original.php

2) After applying your suggestion: http://admin.saipanmall-net.com/problem.php

Note: The AnyLink DropDown Menu works fine with Mozilla Firefox 5.0 without making the changes you suggested. But its not working w/ IE 6.0 (the one that's installed in my computer).
Reply With Quote
  #9  
Old 06-29-2005, 08:52 AM
jscheuer1's Avatar
jscheuer1 jscheuer1 is offline
No Kidding?
 
Join Date: Mar 2005
Location: SE PA USA
Posts: 18,997
Thanks: 19
Thanked 1,132 Times in 1,118 Posts
Blog Entries: 3
Default

Quote:
Originally Posted by me
If it is only one drop box named 'category' you are hiding, this method will work well
You've got 3 input items named 'category' (I know the others are hidden and not actual select boxes but, it still messes things up), so we will have to do something else. Also, you have no beginning <html> tag on your page. It belongs right after the doctype. OK, change:
Code:
if (document.all&&!window.opera){document.all('category').style.visibility='hidden'};
to:
Code:
if (document.all&&!window.opera){document.all('boxOne').style.visibility='hidden';document.all('boxTwo').style.visibility='hidden'};
and change the other line we added:
Code:
if (document.all&&!window.opera){document.all('category').style.visibility='visible'};
to:
Code:
if (document.all&&!window.opera){document.all('boxOne').style.visibility='visible';document.all('boxTwo').style.visibility='visible'};
Now, in the HTML part of the document, change this:
HTML Code:
<select name="category" size="1" onChange="document.change_cat.submit();">
to:
HTML Code:
<select id="boxOne" name="category" size="1" onChange="document.change_cat.submit();">
Then change this one:
HTML Code:
<tr><td><b>Sub Category:</b> </td><td><select name="subcategory" size="1" onChange="document.change_scat.submit();">
to:
HTML Code:
<tr><td><b>Sub Category:</b> </td><td><select id="boxTwo" name="subcategory" size="1" onChange="document.change_scat.submit();">
I chose those two because they seem to be the only two that conflict with the drop downs. I would have further limited it to only the first drop down but, at narrower screen or window widths, other drop downs come into play. I'm not real happy with the look though but, it does eliminate the original problem. A better solution for this layout would be to arrange things so that the form is farther down the page so that the problem never comes up. Perhaps a graphic, representative of what the form is about, could fill the space or just reformatting the intro text to require three double spaced lines:
HTML Code:
<small>Please fill in the following form.<br>&nbsp;<br>Only the Description field is optional.<br>&nbsp;<br>All others are required to successfully add your item to the database.</small>
The word 'successfully' was misspelled, I changed the language slightly as well.
__________________
WWWWWWWWWWWW
- John
________________________

Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Last edited by jscheuer1; 06-29-2005 at 09:31 AM.
Reply With Quote
  #10  
Old 06-30-2005, 12:23 AM
che_rish che_rish is offline
Junior Coders
 
Join Date: Nov 2004
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It worked!! Thanks so much! Your suggestion on making the form farther down the page makes sense too. I'm leaning towards that, but I want to thank you all the same for showing me how to fix this (I really like learning new things).

Thanks for finding those small errors too (<html> and the misspelled word).

One last thing, I saw in some forums like codeguru (http://www.codeguru.com/forum/) that their menu has a dropdown too, but it doesn't disappear when you move the mouse pointer away from it. How do I do this? (Try clicking on their "QuickLinks" menu).

Thanks again!!

Last edited by che_rish; 06-30-2005 at 12:26 AM.
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:58 AM.

Home - Contact Us - Archives - Link to DD - Top 

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.