Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Refreshing target page via flash menu.

Posted on 2004-08-27
5
Medium Priority
?
262 Views
Last Modified: 2008-03-17
I have a flash menu that allows users to specifiy what page opens up.  This is achieved by actionscript assigned to each button..

on (release) {
    getURL("http://domain.com/Vault/index.php?sid="+_root.sid, "mainFrame");
}

but on several pages it shows login details & for some reason if the user logs out on one page & then goes to another page that contained login details it shows then still logged in, although if you refresh the page it then shows the true not logged in status.  Therefore is there a way to get a page to refresh on load or more to the point is there any code i can add to the menu's button actionscript so that after selecting a button the target page is refresh on loading?  or do you guys or girls know of another way?

Thanks.
0
Comment
Question by:creativepresence
  • 3
  • 2
5 Comments
 

Author Comment

by:creativepresence
ID: 11918044
I have sort or resolved the problem with...

<script type="text/javascript">
function refreshPage(){
window.location.reload( false );
}
</script>

<body onLoad="if (location.href.indexOf('reload')==-1) location.replace(location.href+'?reload')">

this reloads the page once it has reloaded & truth be known looks pretty rubbish.  Therefore to improve on the original question, instead of reloading the page once its loaded, is there a way to clear the cache of the target page?  thus acting as its a new page.

Hope this makes sense.

Thanks
0
 

Author Comment

by:creativepresence
ID: 11918064
Thinking about it, that may cause problems if the user want to stay logged in.  Therefore please give suggestions, although im putting this question on hold for the moment until i decide my course of action.
0
 
LVL 10

Accepted Solution

by:
muso120999 earned 720 total points
ID: 11922816
Can you not append the time or counter value to the getURL address above?  The page should load as new as long as the URL is different.

ie.
on (release) {
    getURL("http://domain.com/Vault/index.php?sid="+_root.sid + "&" + (index++), "mainFrame");
}
0
 

Author Comment

by:creativepresence
ID: 11935487
Hi Muso, That seem to work fine and thanks for your answer & also taking the time to read my question and follow ups. Im glad they made sense :o)  Anyway, enjoy the points & if i come across any issues with this question i will return, but until then thanks.
0
 
LVL 10

Expert Comment

by:muso120999
ID: 11936427
I have had to use something similar a couple of times myself, so I hoped it would work for you too.

Glad it did, and thanks for the points - I wasn't sure if you were still looking for an answer, just wanted to give my ten cents :-)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
Suggested Courses

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question