| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 16625 | 2002-03-13 20:22:00 | Collapsable menus in Javascript | Guest (0) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 39021 | 2002-03-13 20:22:00 | I have tried to implement collapsable menus in Javascript. I have downloaded all the necessary javascripts from a website called www.dansteinman.com All the files and scripts work but when I change the working directory, all path sources such as src='../../js/collapsemenu.js'> needs to be changed to the new directory but no matter what I tried it never worked. Maybe I don't use the right sintax. Assuming the files are in the folder C:/script what would the path be? Thank you, Marco |
Guest (0) | ||
| 39022 | 2002-03-13 21:24:00 | Marco, This can be a confusing task, getting all the scripts pointing to the right place. Are you planning on putting this site on the net? If so then you really need your site and the scripts in the same folder, or at least have the scripts in a subfolder - as when it is on the net you can't point it at your c:\ drive. If you've done this, lets say your HTML is in a folder called 'website' and your scripts are in a subfolder of website called 'scripts'. The path of the source should read something like: src='scripts/collapsemenu.js' The other thing you need to check is that inside the .js file itself you've got all the paths etc. set to point to the right place, as there can be quite a few places inside the script file itself that references other files, which may not be pointing in the right place. If you need any more help, feel free to email me at mikel@securabridge.co.nz - we used collapsable JS menu's on the company website <www.securabridge.co.nz and it took me a very long time to get it all working properly, so I understand the annoyance you must be going through. Hope this helps, Mike. |
Guest (0) | ||
| 39023 | 2002-03-13 22:46:00 | When locating the new directory it should look something like (full path) file:///c:/directory/blah%20/ The way the slashes are is important too. You need to put %20 which is Hexidecimal for space. |
Guest (0) | ||
| 39024 | 2002-03-13 22:48:00 | Should have shown a better example because it isn't correct. file:///c:/my%20documents/blah.js that's more like it. And you only need %20 for spaces. |
Guest (0) | ||
| 39025 | 2002-03-14 05:39:00 | Check it out! - Mike's ugly mug at www.securabridge.co.nz lol Just kidding. Incidentally Mike - something's wrong with your code in the menu frame - Netscape is showing the links up as garbled text - I think the drop downs are overwriting each other. Must be one of those scripts that are browser dependent and don't degrade too well. |
Guest (0) | ||
| 1 | |||||