Solved

refresh browser page after an update

Posted on 2011-09-30
7
280 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Chrome Opens With a Grey Page and Sad Face Fav Icon 22 290
Replace value 2 55
ms sql string field to asp variable as number 5 32
email adress opens in chrome 13 63
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
Several part series to implement Internet Explorer 11 Enterprise Mode
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

752 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