Welcome to WebmasterWorld Guest from 107.20.20.39

Forum Moderators: not2easy

Message Too Old, No Replies

Sending css settings from one page to another

sending css settings

   
1:40 pm on Feb 18, 2009 (gmt 0)

5+ Year Member



Basically I have a series of css menus split up into div tags. I then have a little bit of javascript which allows people to click on a subject header and the current css menu will dissapear and another one will appear.

This works perfectly, however I was wondering if there was a simple way to pass the details onto another page, as once the new menu that is being displayed is used it will send the user to another page on the site, read the default css setup and display the first menu again.

2:01 pm on Feb 18, 2009 (gmt 0)

5+ Year Member



Basically im just wanting to change the

div#menu2
{
display: none;
}

to

div#menu1
{
display: none;
}
div#menu2
{
display: block;
}

by default, however I can only really add code into the body section of the area that requires the 2nd menu to apear by default.

2:46 pm on Feb 18, 2009 (gmt 0)

5+ Year Member



Sorry for basically having a conversation with myself here, but Ive come up with a solution.

(I was over complicating things)

Basically in the body of the sections im wanting the 2nd menu to appear in ive put:

<style type="text/css">
div#menu1
{
display: none;
}
div#menu2
{
display: block;
}
</style>

3:53 pm on Feb 18, 2009 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Welcome aboard and glad you sorted it, but for future reference,

I was wondering if there was a simple way to pass the details onto another page,

It sounds like you didn't really need to do this, but if you ever do, the solution is most likely in cookies. Set some small cookie value using Javascript, and check for it's presence on load of any pages. If your pages are output using a server side language, even better; do your cookies from there and eliminate the need for Javascript.