Solved

CoolMenus 4 - dynamically change whole menu position

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

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. …
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…
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…

772 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

10 Experts available now in Live!

Get 1:1 Help Now