DHTML Menu Builder #3

Home » Forums » Free DHTML Menu Builder » DHTML Menu Builder #3


Registered User
91 posts

I would like to be able to turn off the positioning code so that the position of the menu is controlled by the position of the html object that contains the code for the menu on my page - just like Web Form Builder and most other copy/paste html code builders. What is the easiest way to do this?


Senior Advisor
3,144 posts

Stopgreenpath

One method is to use a span and set the span where you want it to be. One of my sites has the menu at the top of the page, and I just have the menu code as the first thing. One of my sites has the menu midway down the page, and I have that menu inside a span. The code looks like this:

<span id="themenu">
<SCRIPT type="text/javascript" SRC="bdcMenu.js"></SCRIPT>
</span>

Then in the menu code, you would have this line:

var TargetLoc='themenu'; // span id for relative positioning

You can change the span id, but be sure it is changed in both the html code for your pages, and make the change in your menu code.

Let us know how this works for you. Bill R.
First Baptist Church
Brighter Day Charities
Roberson Family


Registered User
91 posts

Thank you Bill, but I'm not sure if this is what I'm hoping to do. Are you saying paste the first line of code in the page html? If so, then where? Then revise the menu html? Sorry, I am very unfamiliar with a span. What I am trying to do is over-ride the menu code that dictates where the menu absolute placement is, so I can move my html object around at will and have the menu be placed at that exact location.


Senior Advisor
3,144 posts

Put this code where you want the menu to be located:
<span id="themenu">
<SCRIPT type="text/javascript" SRC="YOURMenu.js"></SCRIPT>
</span>

edit one line in the menu code by adding themenu to make the line look like this:
var TargetLoc='themenu'; // span id for relative positioning

That should be what you want. Bill R.
First Baptist Church
Brighter Day Charities
Roberson Family


Registered User
91 posts

Hi Bill

I still do not understand what you are saying.

"Put this code where you want the menu to be located:"
<span id="themenu">
<SCRIPT type="text/javascript" SRC="YOURMenu.js"></SCRIPT>
</span>

Where I want the menu to be located is where I place the moveable HTML object box that contains the HTML code for the menu. Just like placing a form built with Web Form Maker, or a counter, or just about any other plug in feature, I would like the menu to be placed where I drag and drop the text object box containing the menu code off the clipboard.

I think the confusion is occuring when I use the phrase "HTML Object". I am referring to the drag on box in wysiwyg site builders like Visual Site Designer that can be sized and moved around as seen.

Just like Web Form Designer does not dictate placement of the form with pre-determined parameters, or almost every other html built plug-in, I would like to be able to place the menu based on where I visually place the HTML box, and adjust it's location by visualy dragging and dropping the box around at will.

I appreciate any help on this.


Senior Advisor
3,144 posts

I am not an expert with VSD.

Maybe some that knows the ins and outs of VSD will have an answer. Let me see if I can point someone this way. Bill R.
First Baptist Church
Brighter Day Charities
Roberson Family


Registered User
91 posts

Bill

It has little to do with VSD. All wysiwyg web page builders can import html into a moveable, sizeable html object box. I am asking how to over-ride the DHTML mandatory placement parameters to import non placement dedicated menu html in any web page builder - not just VSD. Web Form Builder is a perfect example of how this is normally done. In WFB, you are not required to enter a placement position for the form. You import the code into a moveable html object box, and the form location becomes the html box location. To change the form location, simply drag the html box to the desired location. Same for hit counters, and just about every other html written plug-in I have ever used.

I am asking for a way to make placement of the menus I build in DHTML MB wysiwyg, by bybassing the unusual predetermined placement parameters, and allowing menu placement to be determined by the visual placement of the html object box containing the menu code.


Senior Advisor
7,831 posts

Hi,

It is not possible to override the placement parametres in DHTML menu builder.

Positioning the menu can be done as Bill has already mentioned, or, if you look up the section below, smack in the middle of the variables in the editable section:

var MenuCentered='left'; // Menu horizontal position 'left', 'center' or 'right'
var MenuVerticalCentered='top'; // Menu vertical position 'top', 'middle','bottom' or static
var ChildOverlap=.2; // horizontal overlap child/ parent
var ChildVerticalOverlap=.2; // vertical overlap child/ parent
var StartTop=1; // Menu offset x coordinate
var StartLeft=1; // Menu offset y coordinate

Remove the words 'left' and 'top' from the two first lines (but let the '' remain), and then you can use the two bottom ones to set the parametres you want. You can play around and change those parametres until you find the position you are looking for by double clicking the html box and editing the script. Ha en riktig god dag!
Inger, Norway
http://www.eikweb.com
http://www.horgenhonning.net/
http://www.norwayroots.com
http://www.johnsflats.com


Registered User
91 posts

Thanks for looking into it guys, but both of your suggestions are easily achievable through use of the parameter input boxes within the program itself anyway. I am trying to acheive wysiwyg placement. I build websites where several pages within the site contain continually changing different layouts and header heights, thereby requiring various placement of the menu. I am trying to avoid the trial and error pains of guessing placement parameters and toggling back and forth between html edit and preview to get it just right. If I could drop the menu into the page through an html object box, just like the rest of CC html plugins, it would allow me to do this on the fly as seen.

Please consider this as a feature for the next version. DHTML menu builder is no doubt the easiest and fastest way to build great menus. Adding this feature would top it off nicely.


Senior Advisor
4,316 posts

HI StopGreenPath,

Bill and Inger asked me to join them in helping you.
I did some test with DHTML Menu Builder and VSD.
I was able to repositon the menu using CSS and <div> tags as Bill suggested and changing the Menu Code as Inger and Bill suggested. Even with this, the menu did not display in FireFox,but would in IE.

But I could not enter a menu.js script into a HTML object box and move it around with my mouse to position the menu.

So we emailed the Big Guy at CoffeeCup and asked for help. DHMTL will not work properly within VSD because of the way VSD codes a site.

I made an example.
Created in VSD: Look in IE and FF.
You can't view the Menu in FF, but you can in IE.
http://www.coffeecuphelp.com/djean/dhtm … efault.htm


Then I took the same coding and put it into straight HTML Editor and it shows in IE and FF:
http://www.coffeecuphelp.com/djean/dhtm … u-vsd.html Darce Jean

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.