Author |
Topic |
|
weeweeslap
Senior Member
USA
1077 Posts |
Posted - 30 March 2004 : 18:28:27
|
ok, I scripted a menu into my developing site and am using this: <script language="JavaScript1.2" src="mm_menu.js"></script> yes, used macromedia fireworks to create it Anyway, placed the mm_menu.js file in the same place as the inc_header.asp file as that is where the code says it should be. Problem is that on the home page the menu's work fine, they pop out as it should, and home page is one level up the folder of the forum folder where the mm_menu.js file is at. Now if I do go to the forum, the pop out menu will not pop out. No errors are displayed, just the menu will will not work. and the forum as stated above is in the folder where the mm_menu.js file is at where the inc_header.asp dictates it should be at. Now if I go to another directory outside the forum folder I get an error, run time error with the error being "object expected" I don't know what this means. I was wondering if you guys or gals can points me out in the right direction to fixing this up. I also can't post a link to the site publicly as the site is out of public reach right now. Thanks. WWS |
coaster crazy |
Edited by - weeweeslap on 30 March 2004 20:44:36 |
|
DavidRhodes
Senior Member
United Kingdom
1222 Posts |
Posted - 30 March 2004 : 18:34:59
|
try <script language="JavaScript1.2" src="/mm_menu.js"></script>
|
The UK MkIVs Forum |
Edited by - DavidRhodes on 30 March 2004 18:36:27 |
|
|
DavidRhodes
Senior Member
United Kingdom
1222 Posts |
Posted - 30 March 2004 : 18:37:24
|
the / will go to your site root to find the file |
The UK MkIVs Forum |
|
|
weeweeslap
Senior Member
USA
1077 Posts |
Posted - 30 March 2004 : 18:42:01
|
ok tried it and I get the same result, I upload also mm_menu.js to the root. I found a minor bug that was causing the object expected so that si fixed now too So pop out menu shows up in the home page ( root) but not in any other directory and no error messages are displayed. |
coaster crazy |
|
|
DavidRhodes
Senior Member
United Kingdom
1222 Posts |
Posted - 30 March 2004 : 18:47:42
|
have you got any other javascript onload events, you can only have one unless they are grouped in one call
I'm presuming your menu uses body.onload |
The UK MkIVs Forum |
Edited by - DavidRhodes on 30 March 2004 18:48:28 |
|
|
weeweeslap
Senior Member
USA
1077 Posts |
Posted - 30 March 2004 : 18:52:41
|
well, I do, the way I have the site is a bit complicated. I ahve set upo to show two different layouts off the same files to two different domains. I have grabbed the variable to read from which domain they are accressing the website and store dit into a variable called strwebsitetoshow then the coding I have: if strwebsitetoshow = "xx.com"" then display this and that and this and that else if strwebsitetoshow = "yy.com" then do this display that and so end if
that is the way I have code it, both are coded alike and the first one is the one giving me the problem while the second one is just fine. Downloading the source off the browser shows only one instance of the onload of events ans disregards the info of the other part of the if statement. Should this have some effect? |
coaster crazy |
|
|
weeweeslap
Senior Member
USA
1077 Posts |
Posted - 30 March 2004 : 18:55:21
|
I can mail my inc_header.asp file so you can see what I mean? |
coaster crazy |
|
|
weeweeslap
Senior Member
USA
1077 Posts |
Posted - 30 March 2004 : 20:44:12
|
nevermind, thanks for the help, in a file that's 948 lines long and 73kb in file size I managed to misplace one semicolon. I found it and moved it to where it should be and now everything is working ok. |
coaster crazy |
|
|
|
Topic |
|