Solved

CoolMenus 4 - dynamically change whole menu position

Posted on 2003-12-11
6
1,292 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
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…

733 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