...

View Full Version : Affecting an html element before opening it



secretfire
11-20-2010, 06:51 PM
Dear forum,
I'm making a site for my g/f – She's writing angel messages for each day of the year, 1 message on 1 page and these (eventually 366 pages) are accessed from this one page:

http://www.helderziendelezingen.be/waarzegster-engelen-leggingen/per-datum.html

This menu page uses JS to slide to particular months. The place I'm stuck is how could it be possible to go from a particular days message, back to the month of that message in the per-datum page (having the page slid to that month)...

for clarities sake... “Terug” means “back”, so for example to click on october 22nd message, read the message, and terug back to Octobers seeds rather than back to the per datum pages month selection calender.

My best effort so far is to put this in the a tag:

onclick="document.getElementById('waarzegstermove').style.cssText='left: -1000px;';"

-1000px would be Januarys terugs, -2000px Februarys terugs etc to have it already slid to that month, this code works when on the same page, but when its on the message page before loading up the per datum page it seems to lose this setting.

I would really appreciate help on this – to be honest I've never used cookies, I dont know what they're for, am I on the right track, is there something else involved like location: hash? or is this what cookies are for?

many thanks, Will

Dormilich
11-21-2010, 02:35 AM
a cookie is use to store small (!) amounts of data persistently (well, as long as the cookie is valid) for a given website.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum