Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Implementing 1 refresh only

Status
Not open for further replies.

avivit

Technical User
Jul 5, 2000
456
IL
I have a menu that looks great using netscae 6,
but only after reloading the page.
How can I reload it (using js or meta etc.) and only ONCE
after first load?

Thanks
 
Hi,

I'm not sure I understand what you mean by only looks good after refreshing the page, surely that is just loading exactly the same page in again? Why should that look different? There are ways to do such things like refresh once only - testing for the presence of a variable in another frame for example, but I'd concentrate on wondering why the page looks wrong in the first place..

Matt.
 
MatthewP, Of course u r right.
well there's positioning of images
in the left of each link, and it seems the positioning
for the links happen before the pos' of the images, and the
first letter of the link appears twice (one instead of the
left pic). Only when I refresh it (when cache is clean of course), it's ok.
Since it's ns6 and I have no probelm with ns4.+ or IE,
and since I validated the page, I have no idea what caused it.
I know it was not like that from the beginning.
But see nothing wrong, and still..it IS ns6. so...?
:)
 
i'd add a counter, and increment it for each refresh ..
something like :

<script>
...
counter=0;
...
</script>
<body onload=&quot;javascript:counter++; if (counter==1) this.reload(true);&quot;>
 
Sounds like a NS6 problem then. Having not used NS6 yet I don't really know what to say. Is the problem to do with having to cache the images? You could precache the images on a previous page if so.. Alternately try the counter method iza has posted above.. but surely you'd need the counter in a separate document in a frameset? Otherwise you'd refresh the counter to 0 and it would loop indefinitely...

<head>
function checkCounter(){
if (top.otherFrameName.counter=0) {
top.otherFrameName.counter++; location.reload()
}
}
</head>

<body onLoad=&quot;checkCounter()&quot;>


Hope that's some help for you anyway.. If you're still stuck let me know where the page is on the net as you've got me intrigued now..

Matt.

 
yes mathew you're right about the counter - it will re initialize :-( !!! sorry i haven't seen that !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top