Aardvark
07-10-2009, 11:15 AM
Hi
I don't know if this is possible, so I am asking a probably stupid or obvious question. Could do with some help though.
I am developing a site.
I usually have hidden divs. I activate them via a piece of javascripting that hides or unhides the divs so it looks like it is swapping data on the site. This works great if all the divs are on the same page.
However, I want to make it so that the main menu items are on separate pages. This means that they open new html. However, the submenus link to hidden divs and NOT to pages. These hidden divs are on separate pages, so I was wondering if it is possible to activate a function to open (lets say) hidden div 3 on a new page from another page?
Something like this:
Original page:
link>href="somthing.html + (activate javascript to unhide div 3)"
Target page:
<div 3 style="display:none">
There is a global piece of javascript linked in the head section that does the function. I just need to know how to add something to the href with the link to activate the javascript. At present the javascript on each page is this:
<javascript:CloseOpenstuff();openstuff('box1d')">
which calls the functions.
Please help. It is doing my head in.
Thanks in advance
I don't know if this is possible, so I am asking a probably stupid or obvious question. Could do with some help though.
I am developing a site.
I usually have hidden divs. I activate them via a piece of javascripting that hides or unhides the divs so it looks like it is swapping data on the site. This works great if all the divs are on the same page.
However, I want to make it so that the main menu items are on separate pages. This means that they open new html. However, the submenus link to hidden divs and NOT to pages. These hidden divs are on separate pages, so I was wondering if it is possible to activate a function to open (lets say) hidden div 3 on a new page from another page?
Something like this:
Original page:
link>href="somthing.html + (activate javascript to unhide div 3)"
Target page:
<div 3 style="display:none">
There is a global piece of javascript linked in the head section that does the function. I just need to know how to add something to the href with the link to activate the javascript. At present the javascript on each page is this:
<javascript:CloseOpenstuff();openstuff('box1d')">
which calls the functions.
Please help. It is doing my head in.
Thanks in advance