Solved

refresh browser page after an update

Posted on 2011-09-30
7
273 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
ID: 36892968
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
ID: 36893062
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
ID: 36893094
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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:crescue
ID: 36893119
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
ID: 36894482
That is impossible, can you share your sample?
0
 
LVL 28

Expert Comment

by:sybe
ID: 36901811
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
ID: 36908287
That cannot be flash problem as soon as SharedObject get flush command data submitted to the file
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Browser Chrome downloads colored link 5 48
Cannot open file from ASP if user is "logged in" 13 30
Hide Table in merge 3 34
Code Manager | Snippits 2 37
Bada platform is becoming more and more famous this days and people talking about same. Some friends included those who have bada OS mobile asked me "what is bada?"and "what its features?". That encouraged me to research and write this article. [st…
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
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.

820 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