Question Details

Browse

Reload the page

By rajaratheesh - May. 06, 2008

Hi,
I am using an application is used PHP , there is one table, heading of the table is taken from XML, values of the row is taken from text file.

I want to reload the page while clicking on the Refresh button. Can you give me input to do.

Thanks in advance.


Answers

Add Answer
  1. By an anonymous user on May. 08, 2008

    I'm not sure what you are trying to do.


    1] Do you wish to reload the page by getting the user to click on a refresh button? If so you can have a form submit action that passes the parameters passed up so they don't have to be reprocessed. You can do this as a get or a post

    2] Do you wish to re-read the values from your data file when the user refreshes the page by clicking the browser's reload button? If so, you can re-read the values by calling an onload javascript function.


    0 Votes
  2. By leehj2008 on Sep. 01, 2008

    at the button set its event method like this :

    onclick="somefunction()"

    and this function redirect to the page location.


    0 Votes
  3. By leehj2008 on Sep. 01, 2008

    window.reload() or window.location=this page's location url.


    0 Votes
  4. By Frenzy on Sep. 02, 2008

    seems like you're loading your data using Ajax and want to implement a 'reload' button - to fetch loaded data again without refreshing the whole page. Am I right?


    If so, the you need to figure out where is in your code the javascript routine that sends your ajax-request. Maybe it's an onload handler of your page? - you have to figure out this by yourself.


    After you find that piece of javascript you can you it somewhere else if it is in a separate function. Otherwise it would be a good idea to refactor it so.


    Then you can just put a button, and bind that function to your button's onclick event handler


    0 Votes
Share your knowledge