By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,035 Members | 1,471 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,035 IT Pros & Developers. It's quick & easy.

refresh

P: n/a
hi,
i have an html page that when it loads theres an onLoad event called
which calls a function.

now what i want to do is be able to click a link that refreshes the
page but at the time on the refresh it skips the onLoad event.

is this possible?
if it is can somebody please help me.
thanks
-morc

Jan 24 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
VK
morc wrote:
hi,
i have an html page that when it loads theres an onLoad event called
which calls a function.

now what i want to do is be able to click a link that refreshes the
page but at the time on the refresh it skips the onLoad event.

is this possible?
if it is can somebody please help me.
thanks
-morc


Assuming that same domain session cookies are allowed (a very
reasonnable assumption but still not guaranteed):

function myOnloadFunction() {
if (unescape(document.cookie) != 'Morc was here') {
// blah-blah-blah
document.cookie = escape('Morc was here');
}
}

Jan 24 '06 #2

P: n/a
thanks. but im not sure thats what im looking for. input appreciated.

I have 2 html files embeded wihtin each other. frameset and content.
would it be possible to refresh content when frameset loads? if so how?

thanks agian
-morc

Jan 24 '06 #3

P: n/a
to be more specific:
i have index.html, which contains links lets call it link A.

when i click link A, frameset loads up as a <div> whcih also loads
content whcih displays its default content.
when u click a link in the frameset it changes the content (flash
files)

now lets say i were to click link B after that and then return to link
A. content would not be displaying its default content like i want it
too. it displays the previous selection. i need it to display default
content everytime i click link A.

if anyone wants to help but doesnt understand please tell me what you
do not understand an i will explain it to you.
thanks
-morc

Jan 24 '06 #4

P: n/a
Alright, I'll try again.

I have a page. Index.html.
On this page to there is a menu with 4 buttons. (4 DIV's).
One of the buttons (call it Link A) when clicked: loads another html
page with in its <div> named frameset.html whcih contains a menu with a
series of links.
Within frameset.html there is another <div> which loads another html
page (content.html) which displays content when a link from frameset is
selected.

My problem:
When I click a link from frameset.html the content is displayed. After
this if I were to click one of the 4 buttons from index.html (link B)
and then click link A again the default content will not be there. It
will display the content fromt he last frameset link i clicked. I want
it to display the default like the first click.
My Question:
I was wondering if there was a way for when i click Link A that
content.html is refreshed thus displaying default content.

thanks hope this was more understandable.
-morc

Jan 24 '06 #5

P: n/a
VK

morc wrote:
Alright, I'll try again.

I have a page. Index.html.
On this page to there is a menu with 4 buttons. (4 DIV's).
One of the buttons (call it Link A) when clicked: loads another html
page with in its <div> named frameset.html whcih contains a menu with a
series of links.
Within frameset.html there is another <div> which loads another html
page (content.html) which displays content when a link from frameset is
selected.

My problem:
When I click a link from frameset.html the content is displayed. After
this if I were to click one of the 4 buttons from index.html (link B)
and then click link A again the default content will not be there. It
will display the content fromt he last frameset link i clicked. I want
it to display the default like the first click.
My Question:
I was wondering if there was a way for when i click Link A that
content.html is refreshed thus displaying default content.


Wow! That seems like really overcomplicated approach - unless frames
are used to get content from another domain and then any advises will
not work.

Otherwise (assuming you *want* to keep it as complicated as it is) you
have to deal eather with cookies (my first advise) or with the link
query part like <a href="frameset.html?default.html"> and read the
query part to set the content.

Something like that... Really hate frames, sorry... Someone may come
with a more detailed solution.

Jan 24 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.