Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CoolMenus 4 - dynamically change whole menu position

Posted on 2003-12-11
6
Medium Priority
?
1,310 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 1000 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 1000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…

604 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