473,407 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

issue on onload() event

3
hi..,
i have a strange requirement over here.., i need to set a <div> hidden when a page is loaded for the first time and i need to put the <div> visible when the page is reloaded (i mean after the first time on wards..).

Iam setting the <div> visibility properties using window.onload() event..,so when the page is first loaded using onload function it will set the <div> invisible, and later i need the <div> to be visible when i reload the page..,how can i do that?

so how to identify the scenario of whether the page is loaded for the first time or loaded for more then one time..

Suggestions appreciated.,thanx.
Jan 23 '08 #1
2 1519
pendem
3
hi..,
i have a strange requirement over here.., i need to set a <div> hidden when a page is loaded for the first time and i need to put the <div> visible when the page is reloaded (i mean after the first time on wards..).

Iam setting the <div> visibility properties using window.onload() event..,so when the page is first loaded using onload function it will set the <div> invisible, and later i need the <div> to be visible when i reload the page..,how can i do that?

so how to identify the scenario of whether the page is loaded for the first time or loaded for more then one time..

Suggestions appreciated.,thanx.
indirectly it means identifying that the page has been loaded for the 2nd time..,so checkin that condition we can set the <div> visibility accordingly..,but how to identify whether the page has been loaded for the first time? or else reloaded?
Jan 24 '08 #2
gits
5,390 Expert Mod 4TB
hi ...

onload of you page you may set/read a cookie to achieve that ...

in case the cookie is set already the user had to have the page loaded once :) another way would be to store a flag for that issue at the serverside.

kind regards
Jan 24 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Bender | last post by:
Hi, I am wanting to capture an onmousedown event without firing the body tags onload event. Also, if anyone could explain why this happens that would be excellent. I can't see how an...
9
by: Robert Misiorowski | last post by:
Hello, I have a very perplexing (at least to me) problem that hopefully someone can help me with. I'm making a site with a 3 column layout. In the middle column (my fluid column) I am trying to...
4
by: Pai | last post by:
hello there, I am trying to rersize the window it works find in IE but doea not work with mozilla window.attachEvent(onload,MWSOnLoad); window.onload = function (MWSOnLoad) { alert('hello');...
6
by: Brian | last post by:
Hi everyone, I'm writing a function (in javascript) that needs to do one thing if the page has not loaded, and another (different) thing if the page has already loaded. I'm looking for a way...
10
by: berg | last post by:
I'm trying to use the onload event to load a series of urls. What I find is that the onload function is only called one time no matter how large the array. Here is the onload function. var...
2
by: laredotornado | last post by:
Hello, I am looking for a cross-browser way (Firefox 1+, IE 5.5+) to have my Javascript function execute from the BODY's "onload" method, but if there is already an onload method defined, I would...
3
by: Christian | last post by:
hi, what is the difference between the Page_Load() and OnLoad() event handlers. do they originate from a different point ?
1
by: flutetones | last post by:
http://67.189.52.24/~metafusionserver/public_html/training.php Here is a link to my server. I have an issue that doen't make sense. What's hapening is this . . . What's going right . . .
20
by: Mark Anderson | last post by:
Hi, I have this in an external JS library: ///////////////////////// function addMyEvent(){ var obj; if(document.attachEvent) { obj = document.getElementsByTagName('img'); for...
4
by: robertallenpayne | last post by:
I have been asked to develop an application in Access for work. This application must have a simple user interface because the folks using it are not "database people" - their words, not mine. ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.