Solved

CoolMenus 4 - dynamically change whole menu position

Posted on 2003-12-11
6
1,277 Views
Last Modified: 2007-11-27
Using CoolMenus 4, how do I change my menu's position through a JavaScript function?
This is what I'm using and nothing is happening:

function MoveMenu(x,y) {

oCMenu.fromLeft=x;
oCMenu.fromTop=y;

}

Thanks,
Jonathan
0
Comment
Question by:jcampbell2000
6 Comments
 
LVL 46

Accepted Solution

by:
fritz_the_blank earned 250 total points
ID: 9920079
The problem is that you will have to re-envoke the menu call: you already have the menu created, so changing the X, Y where it will be created will have no effect.

So, try dynamically changing the coordinates and then re-execute the code that creates the menu.

FtB
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9920099
What we will have to do is to see is if calling the code again creates a second menu or moves the first.

FtB
0
 
LVL 25

Assisted Solution

by:James Rodgers
James Rodgers earned 250 total points
ID: 9921103
have yuo considered wrapping the menu in a div and repositioning the div?

this function

function changeDivPos(divLeft,divTop){
            document.getElementById('divCoolMenu').style.top=divTop;
            document.getElementById('divCoolMenu').style.left=divLeft;
      }


with this div

<div id="divCoolMenu" style="position:absolute; top:25; left:50; background:00008b; width:800; height:40;">
<script>
oCMenu.construct()            
</script>

called from a button

<input type="button" onClick="changeDivPos(80,250)" value="go">

repositioned the entire menu

i could not reposition the menu bar thats why the div has a background colour
0
 
LVL 1

Expert Comment

by:AbhiM
ID: 9923294
Im not sure if the above reply answered your query or not. If not, head on to www.dhtmlcentral.com/forums/ to get info from the site which has given cool menus free. ;)


-Abhi
0
 
LVL 16

Expert Comment

by:jaysolomon
ID: 10434327
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Split: fritz_the_blank {http:#9920079} & Jester_48 {http:#9921103}

Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jAy
EE Cleanup Volunteer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
iframe detection of parent window scale 20 60
Randomize in Owl Carousel v1.3.2 6 20
Capture logon name 13 37
Angular - disable input field on page load 4 13
When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now