Reputation: 805
Here is the situation I've got:
Main page, here i have 3 choices(links to the same page) witch actually are 3 types of galleries but they are all on the same page.
Gallery page, when the page is opened it loads the 1st gallery ( i load the others and hide the previously viewed from 3 other buttons which correspond to the other galleries , and i do it with javascript )
I don't really have a way of telling what choice has been made,because they all point at the same page. Since i am doing the whole gallery with javascript , is there anyway to link a variable or something from the 1st page to the 2nd ?
Or just a way of knowing what choice has been made ?
Thanks, and ask away if something is not clear enough.
Upvotes: 2
Views: 403
Reputation: 603
Just off the top of my head...
Since no reloading. In that case, if it was me, I would either make a Javascript object that contained information on my gallery that I needed, like so:
var global_galleries = [
{
"name": "gallery_1",
"open_state": true
},
{
"name": "gallery_2",
"open_state": false
},
// -- and so on
];
then set this during your 'gallery open' event. It would make a handy way to catch user actions per gallery.
OR you could do something down and dirty to check the .style.display of your galleries themselves.
Upvotes: 2