newbee question 2

Discussion in 'Javascript' started by Ross, Sep 27, 2005.

  1. Ross

    Ross Guest

    Hi,

    I want to refresh/reload the current page but I want to use the same code on
    every page on the site so instead of changing the line in every page

    location = 'test.php';
    location = 'test2.php';
    location = 'test3.php';
    location = 'test4.php';

    etc.

    I want a single line that will just do it no matter what the page is named.

    R.
     
    Ross, Sep 27, 2005
    #1
    1. Advertisements

  2. Ross

    Erwin Moller Guest


    Hi Ross,

    That is much clearer. :)

    Try location.reload(true);

    Regards,
    Erwin Moller
     
    Erwin Moller, Sep 27, 2005
    #2
    1. Advertisements

  3. Ross

    ASM Guest

    Ross a écrit :
    and (once more) what is suposed to do your php ?

    location = "test.php?test='+self.location;

    will send url of active page as value of a variable 'test'
    attached to your php's url

    then in your test.php
    by a php http_request (or something else like that, see a php ng)
    you get url of page loaded
    after ... what you'll do with that info ... no sè ...
     
    ASM, Sep 27, 2005
    #3
  4. Ross

    Lee Guest

    Ross said:
    So why didn't you title this post "Refresh/reload current page" ?

    That way, somebody coming along after you, looking for information
    about refreshing the current page would know that they might find
    an answer in this thread.

    There are also many people who choose to ignore posts that don't
    give some hint about the topic in the subject line.
     
    Lee, Sep 27, 2005
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.