Solved

refresh browser page after an update

Posted on 2011-09-30
7
288 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Now-a-days, indirectly, postal services have been replaced by email services. Yes, whenever we hear the word "email" a lot of people only think of gmail. Some people still think that email and gmail are one and the same thing :-). Let's see some …
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
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 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.

617 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