Help with DHTML Menu - Post ID 73699

User 489543 Photo


Registered User
51 posts

Hello,

I was looking for a bit of help. I have a website up and running for a client of mine and there seems to be an issue with the navigation menu. On most screen resolutions, it appears in place, but when resolution becomes smaller it moves to the right and overlaps the text. I have not checked other browsers but can imagine it is happening there as well.

Can someone please help me with this.

Web address is: www.paylessplumbingsvcs.com

Thank you!
User 282670 Photo


Registered User
3,940 posts

Hi AE,
in your menu code look for:
var StartLeft=125; // Menu offset y coordinate

try changing startleft to just a 1 see if that helps.




User 489543 Photo


Registered User
51 posts

If I do that, the menu appears at the very left of the screen and not where I need the menu, is there any way to use relative positioning so the menu "locks" in place regardless of the browser window size or computer resolution?

Thank you,

User 282670 Photo


Registered User
3,940 posts

Hi AE,
I'm not to keen in the coding but in the header you'll see a line:
div.Object9369 { position:absolute; top:229px; left:42px; width: 63px; z-index:21; }
where you can change the absolute to relative if you care to give that a go.
BillR will be here shortly I'm sure he'll have a better answer for you.




User 355448 Photo


Ambassador
3,144 posts

AE,

The solution I would use is to delete the menu code from VSD, and copy the code to a text editor. Delete the top line "function Go(){return}" and delete
"</script>
<noscript>Your browser does not support script</noscript>
<!-- REST OF BODY CONTENT BELOW HERE -->"

Now look at the menu code and locate this line:
var TargetLoc=''; // span id for relative positioning
now change this line to read:
var TargetLoc='themenu'; // span id for relative positioning


What is left is javascript code and you can save it as yourmenu.js or any name you want as long as you use .js as the extension.

Now you can add some html to VSD where you want the menu to be located. That html will be:
<span id="themenu"><SCRIPT type="text/javascript" SRC="yourmenu.js"><SCRIPT></span>

Use the html tool in VSD to add that code.

Now you will need to use an FTP program to upload the menu javascript to your website.

I hope I have covered everything. If you have any questions, please do let me know.
User 489543 Photo


Registered User
51 posts

Can I do this withe the free HTML editor and using the free FTP program to upload it?

I am not at my home computer at the moment but will try it very soon.

Thank you!
User 355448 Photo


Ambassador
3,144 posts

Yes, the free HTML Editor will work for creating the javascript and the free FTP program can be used to upload the javascript.

The placing of the menu in your VSD designed page should be done with VSD. If you edit the HTML of the page, you will not have that change in VSD and if you update the page later, you will need to go back and edit the HTML again.

One big benefit of putting the menu code in a file outside of VSD, it that once you get the small HTML code added to each page of your program, future menu changes can be done with a change to a single file.
User 489543 Photo


Registered User
51 posts

So, would I have to re sync the whole page in VSD, or simply upload the new HTML in Direct FTP? Also, would I have to delete the menu on my VSD page due to uploading the menu from Direct FTP? Is it possible to keep the menu I have on VSD and upload the corrected menu HTML?

User 355448 Photo


Ambassador
3,144 posts

When you make the change to VSD that removes the menu code, and inserts the code that calls the javascript, you will need to reupload VSD.

VSD will then call the javascript that was previously uploaded. Modifications to the menu will not need an upload to VSD, but will need an upload to replace the javascript file.

>>Is it possible to keep the menu I have on VSD and upload the corrected menu HTML?<<

I don't understand. This is using the same menu, just a different approach to using it.
User 489543 Photo


Registered User
51 posts

So this is what I understood from your posts.....

1. I get the code I have in my HTML box in VSD, place it in the HTML editor, edit the code, save it with a .js extenstion, then repaste the corrected code into an HTML box in VSD, along with another HTML box for the span?

2. Open the .js file in Direct FTP and upload it to the host

3. Resync VSD website to server

4. Problem fixed?

Would it be possible to edit the current menu on my site using the HTML editor then repaste it back to VSD, with another HTML box with the span id, then do a reupload in VSD, without having to use the Direct FTP program?

Thanks for all your help Bill! I really do appreciate it!

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.