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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Monitor size changes left alignment for slide out menu 1

Status
Not open for further replies.

charanch

Programmer
Jan 3, 2004
55
US
Hi guys,

I'm not a javascript guru at all, and couldn't find a thread that helped, but I have a script when you mouseover a button, a menu slides out to the right. Works great on my 17" monitor, but on a larger monitor, the slide out menu is covering the button. Finally figured out I have the left alignment set at 225 but since the site is centered, 225 on a larger monitor isn't in the same place. This seems to be hard for me to explain. Here's the menu code (ASP is mixed in):
Code:
function menu (left,top) { this.childMenuOpen=-1; this.parentMenuIndex=-1; this.hasMouse=false; this.left=left; this.top=top; this.childCount=0; this.children=new Array; this.url="";}


addMenu(225,70);
<%do while not rs.eof%>
addMenuItem("<%=rs("gallery_cat_name")%>","?galleryid=<%=rs("gallery_catid")%>","");
<%rs.movenext
loop%>
drawMenus();

Any ideas about how I can correct this? Is there a way to set the alignment from a certain point? Thank you for your thoughts and I apologize for the "not very technical" explanation...
 
I have the left alignment set at 225

You have the left alignment of what set at 225? The menu? The button? Your page?

Can you post a link to your page? We have no idea what the "addMenu" function actually does.

Incidentally...

Works great on my 17" monitor, but on a larger monitor, the slide out menu is covering the button.

The monitor size has nothing to do with it. It is the resolution your graphics card is set to that is the problem.

Hope this helps,
Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Hi Dan,

Thanks for the reply. The left alignment of the menu is 225. I explained it best I knew how and posted the code I had. I thought the function and the addmenus code I posted would be enough. I'll do more research before I post again. Thank you.
 
Thanks Dan for the head's up on the resolution. I found a script to check for resolution. I modified it to work with slide out menu script. I tested it by changing my desktop settings to all of the different sizes and it's working great now. Thanks again.
 
don't" what? Post another smart @$$ answer? You know I was genuinely appreciative, even in light of the curt answer by Dan. I apologized for my inept javascript ability. I thought this was a forum to help people, not ridicule. I have never understood an attitude like that. Some people feel bigger when they do that, I guess. It doesn't help anyone.
 
Not testy, just disappointed in how some javascript forum experts seem to have a tone of talking down to people and aren't even really trying to be helpful as much as they are trying to show how much they know and how great they are. So "ridicule" probably wasn't a proper and fitting analogy. The other Tek-tip forums aren't like that. Just this one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top