We help IT Professionals succeed at work.

AS3 datagrid and php refresh

eager_to_learn
on
Medium Priority
638 Views
Last Modified: 2012-05-11
Hey Team:

I have a flash datagrid that populates information from a mysql database using php.

The problem:
Everything loads correctly but I am having a problem with refreshing the datagrid without having to exit the website and logging back in. The function calls the php script and is attached to a button. Each time the button is clicked the php script is activated and the datagrid should update...but is not. Instead, the datagrid refreshes without the updates.

Question:
What are the possible solutions? maybe a cache problem?

Thanks for the help
Comment
Watch Question

Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Sounds like a possible solution. How and where am I writing the code to concat the random timestamp?
The place where you are calling the php url from within flash

Warm Regards
Deepanjan Das

Author

Commented:
Is there an example available? maybe a link to a tutorial?
if you can share your piece of code within flash, that would be easier to suggest.

Warm Regards
Deepanjan Das

Author

Commented:
Hey deepanjandas;

Thanks for leading me in the right direction. Below is the code that is now working. Problem solved!

//Renames the script file everytime its called
var URL_ur:URLRequest = new URLRequest(file.php + "?r=" + new Date().getTime());
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.