- Create Account

how to link from the menu into the mainDiv?

Forums > Combining Scripts > how to link from the menu into the mainDiv?
Author
Message

1) Q Group: Members
Posts: 31 Joined: 4 Apr 2004 Location: IP: 213.84.--.--
Hi Angus,

i decided to go for a combination with the scroller and the menu instead of scrolling the menu i will scroll the content :)

But  i run into this problem, sorry if i sound stupid but i cannot get it to work.

i have an images only menu and i want to have all links from the menu point to the mainDiv.

i've tried putting

addItem('', 'mainDiv.load("what_1.html")',  'js:', subMWhat_1, 32);

but this won't work. instead when i click it i get 'error on the page' message in IE.

i use both newest beta script versions.

your help is greatly appreciated :)
lucid dreamers unite! visit http://ld4all.com

2) Angus Turnbull Group: Moderators
Posts: 4042 Joined: 7 Dec 2003 Location: New Zealand IP: 202.36.--.--
Well, that should work... exactly what error message did you get in IE? Click the message for more details, it should tell you something like "syntax error in line 123" or similar...

Good luck - Angus.

3) Q Group: Members
Posts: 31 Joined: 4 Apr 2004 Location: IP: 213.84.--.--
the error i get is:

"mainDiv" not defined.

i have put the code into the pop_data.js, which is loaded into the page which calls the ScrolDiv script.

I put the script loading tag right after the body tag of that page.


lucid dreamers unite! visit http://ld4all.com

4) Angus Turnbull Group: Moderators
Posts: 4042 Joined: 7 Dec 2003 Location: New Zealand IP: 202.36.--.--
All your scripts should be in the scroller document itself, not the page loaded inside the scroller document... so if that's the case then make sure they're all in the topmost page and that "mainDiv" is actually the name of your scroller object and the scroller script is working.

Good luck - Angus.

5) Q Group: Members
Posts: 31 Joined: 4 Apr 2004 Location: IP: 213.84.--.--
thank you!
i rechecked the source and it was named content, so when i put that in it worked.. :)
lucid dreamers unite! visit http://ld4all.com

Post a Reply:

You are not logged in, and will be posting anonymously as a guest. If you want to post using an account, please login at the top of this page.