Solved

Refreshing target page via flash menu.

Posted on 2004-08-27
5
256 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 180 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

932 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now