Solved

CoolMenus 4 - dynamically change whole menu position

Posted on 2003-12-11
6
1,296 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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
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…

707 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