Page 1 of 1

How do i load page everytime with new data?

Posted: Wed Sep 27, 2006 1:23 am
by urnetmate
hello frnds,

I have used a CMS system and done some changes as per the requirements. The CMS uses the Javascript and PHP for coding and MySql as backend.

The modules like PDF Manager and Image Manager has the interface to upload .pdf files and .jpg/.gif files resp.

These pages are in php, but the overall editor tools are called from a .js file.

When I upload any file it get's reflected in the list on the same page, but if i close that and again clicks on the same tool then that newly uploaded doen't get place on that list of existing files.(the file gets uploaded on the specified folder.)

When i logout and logs in the system the i can see the file in list. So i think it's a problem with cache...

What can i do? Plz suggest me some solution..
waiting....

Posted: Wed Sep 27, 2006 1:58 am
by Rovas
Have refreshed your page after a sucessfull upload?
Put these in your php file it stops the browser from caching data on that page.

Code: Select all

header( "Cache-Control: no-cache, must-revalidate" );
	    header( "Pragma: no-cache" );

thx...partially done

Posted: Wed Sep 27, 2006 3:39 am
by urnetmate
thx for the reply...now my problem is partially solved..

The page is been called from a owner php page on which a HTML editor is placed. One of the tools from the editor is 'PDF Manager', which opens the upload functionality in a new pop-up window.

now with setting header() i'm getting the newly uploaded file in the list, but if i reopens the owner form of html editor. that means now i have to reload the js file used for the html editor.

how do i reload the js file in the same page so that i need not to reopen the owner form page?