Solved

refresh browser page after an update

Posted on 2011-09-30
7
251 Views
Last Modified: 2012-05-12
I am using Flash CS3 and  ASP to update a database in MsAccess. Everything works fine.  The problem is that when I update the database and the SharedObject, I call the domain (to reflect the changes), BUT IT LOADS THE OLD INFORMATION. I need to EXIT or CLOSE the browser, and open the website again, and IT SHOWS THE CORRECT DATA.  I guess this has to do something with cache or expiration, but I can not figure it out.
The code below is after it has CORRECTLY updated the database, and I am ready to show the CURRENT UPDATE.  I thought that by calling the domain again, it will re-fresh it NUT NOT :(

Thanx

    var my_so:SharedObject = SharedObject.getLocal("tipocambio", "/");
    my_so.data.compra = compra.text;
    my_so.data.venta = venta.text;
    my_so.flush();
      getURL("http://www.bestratelaredo.com");            
0
Comment
Question by:crescue
  • 4
  • 2
7 Comments
 
LVL 29

Accepted Solution

by:
dgofman earned 500 total points
Comment Utility
Can you try to validate if files saved?

var my_so:SharedObject = SharedObject.getLocal("tipocambio", "/");
    my_so.data.compra = "compra";
    my_so.data.venta = "venta";
    my_so.flush();
my_so.close();

my_so= SharedObject.getLocal("tipocambio", "/");
trace( my_so.data.compra);
trace(my_so.data.venta);
0
 

Author Comment

by:crescue
Comment Utility
Yes, it validates
IF I close the browser, and re-load it again  EVERYTHING WORKS !!!
or how can I force the browser to close ?
0
 
LVL 29

Expert Comment

by:dgofman
Comment Utility
You don'n need to close a browser.

As soon you execute flush command the data it saved.

Why do you want to close a browser?
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:crescue
Comment Utility
Ohhh I guess I didn't explain correctly, sorry
It does update the SharedObject  
THE PROBLEM is that I load the fields in the SharedObject  AND DISPLAY THEM IN MY BROWSER
but those values ARE NOT UPDATED unless I close the browser and load the page again
I have a button in Flash CS3 that performs the ASP, Flush, etc... IT WORKS FINE, but I am not able to see the update immediateley, UNLESS I CLOE THE BROWSER AND LOAD THE PAGE AGAIN

Thanx for ur help, sorry for the original explanation :(
0
 
LVL 29

Expert Comment

by:dgofman
Comment Utility
That is impossible, can you share your sample?
0
 
LVL 28

Expert Comment

by:sybe
Comment Utility
The problem is probably in Flash. It caches urls. Force flash to reload the url properly, for example by adding a time dependent value in the querystring.
0
 
LVL 29

Expert Comment

by:dgofman
Comment Utility
That cannot be flash problem as soon as SharedObject get flush command data submitted to the file
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
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.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

771 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