Solved

Refreshing target page via flash menu.

Posted on 2004-08-27
5
255 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

763 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

7 Experts available now in Live!

Get 1:1 Help Now