PDA

View Full Version : Slide Menu fix "Y" offset



glasshoppa
09-17-2008, 03:28 PM
1) Script Title: Dynamic-FX Slide-In Menu (v 6.5) All, or (variation) Omni Slide Menu

2) Script URL (on DD):
http://www.bobkush.com/scripts/slideinmenu.htm

3) Describe problem:
Right now I'm using a DHTML Slide menu on the Serpent site that I found on Dynamic Drive (hover over the protruding box on the left) http://www.serpentautosport.com/. It works great in the sample, http://www.dynamicdrive.com/dynamicindex1/slideinmenu.htm, but is rather twitchy when in production and doesn't have provision for menu bar text.

I located a better slide menu http://www.bobkush.com/scripts/slideinmenu.htm, that uses a couple of Javascripts to configure it ("ssm.js" and "ssmItems.js"). I've been testing it in the MyWebs (on my HD) and it works well, except I'm having a problem positioning it vertically on the page.
2063
Looks like the "YOffset", and "staticYOffset" are the variables used in the "buildMenu()" function, "document.write" method to position it. For some reason, when I change the value, it doesn't move but stays at the top left corner. I have tried to pass the variables explicitly in the function call, append "px" to the Top: statement, and set menuIsStatic to "No" to bypass the makeStatic() function, etc...No luck. Could use some help. I would like Top: to be 203px as in the old menu (directly left and centered on wheel pic). Also, I copied the scripts out with a test page http://www.serpentautosport.com/menu2_index.html. Doesn't seem to be working at all. Do I need to state path to scripts explicitly in the Home page HTML?

I have seen many folks out there using a variation of this script, but all have it placed in the same offset on the Y axis. If I set YOffset to "0" it'll go into the topmost left corner, but no matter what positive value I set it, it seems to only go 30px down. Interestingly, the X-axis behaves the same.

Many thanks,

cvele
09-17-2008, 07:35 PM
YO! YO! Man. Slow down.
Script works just fine to me.

fix: include this in head page

<script src="ssm.js" type="text/javascript"></script>
<script src="ssmItems.js" type="text/javascript"></script>

and change the YOffset parametar (in ssmItem.js) to your need.

remeber to save page and js file in the same directory or give a specific path to js files.:D

cvele
09-17-2008, 07:44 PM
or what is more correct:

http://www.dynamicdrive.com/dynamicindex1/davidmenu.htm


<SCRIPT SRC="ssm.js" language="JavaScript1.2">

//Dynamic-FX slide in menu v6.5 (By maXimus, http://maximus.ravecore.com/)
//Updated July 8th, 03' for doctype bug
//For full source, and 100's more DHTML scripts, visit http://www.dynamicdrive.com

</SCRIPT>

<SCRIPT SRC="ssmItems.js" language="JavaScript1.2"></SCRIPT>

:rolleyes:

glasshoppa
09-18-2008, 05:29 PM
Thanks for replying cvele. You're the first taker. Even maXimus (bad e-mail addr), bobkush, and jscheuer have not responded to e-mails regarding this problem.

However, I'm not sure you understood what I am saying. Did you take a look at the source on Menu2_index.html? If so, you would have seen that I have the script src lines in there. I have also said that when I change the YOffset value, it doesn't move down on the page past ~30px.


YO! YO! Man. Slow down.
Script works just fine to me.

That's great - show me. Change the YOffset down to the middle of the page and do a screen-grab and post back here, or better yet, post a link to a web page that utilizes this menu with it 200 pixels or so down.

Thanks,

glasshoppa
09-24-2008, 06:22 PM
Well, looking back at this issue I did some google searches on "ssm.js" and found some threads from a different forum last year in which jscheuer had some replies with code examples. I noticed that every 'YOffset' reference usually had 'px' appended to it. My earlier attempt I used + to append 'px' and though I checked the syntax using "1st javaScript Editor", which checked-out, it didn't work.

Today I tried the following: Top:'+YOffset+'px; and it worked! Though I've set YOffset=100 (not 203). I then appended 'px' to each reference to 'YOffset' on the "if (IE||NS6) {document.write..." line of the buildMenu() function. Do I need this on the "if (NS)...", or "if (NS6)..." lines as well?

Much to my dismay, I have a new problem. The array has truncated (chopped-off after "Interior" header) and now looks like this.
2080
Can anyone give me a clue - I've checked the ssmItems.js to see if there are any syntax errors in the ssmItems section. Doesn't look like it. Could this be a different variable I've overlooked (array cell count or length)?

Thanks ahead of time,

glasshoppa
09-26-2008, 03:07 PM
I found another instance of this script by the same original author here:
http://simplythebest.net/scripts/DHTML_scripts/dhtml_script_54.html

Looks like an earlier (simpler) version.

With a bit of editing, I now have my slide menu - that works as intended. Thank you maXimus for being so prolific!
2084

I hate to say it, but this forum was about as useful as tits on a nun! Dynamic? Not the words I choose to describe it - in terms of support. But without which I would not have found this script to begin with. One has to count his blessings...