SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Dec 2006
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    reload the 1st page when <back> is click on the second page. how???

    hi, i wish to reload the 1st page when the <back> <a href="javascript:history.back(-1);"> is click in the second page...

    how can i get it works???

    thank you!

  2. #2
    SitePoint Zealot
    Join Date
    Dec 2006
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i added <body onload="window.location.reload()"> on the 1st page, it end up with keep reloading the 1st page,...

    how can i make it only reload one time???

  3. #3
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi, i wish to reload the 1st page when the <back> <a href="javascript:history.back(-1);"> is click in the second page...

    how can i get it works???
    Code:
    window.history.back()
    or
    window.history.go(-1)
    not
    window.history.back(-1);
    Although the back(-1) doesn't seem to bother IE6 or FF1.0.7.

    i added <body onload="window.location.reload()"> on the 1st page, it end up with keep reloading the 1st page,...

    how can i make it only reload one time???
    You can't do it that way. You are telling the page to reload after it finishes loading. So the page loads, and when it finishes loading the onload event handler fires causing the page to reload again...and on and on.

    Even if you could reload the page only one time, I don't see why you would ever ask a page to reload after it just finished loading.

  4. #4
    SitePoint Guru
    Join Date
    Apr 2006
    Posts
    802
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi, i wish to reload the 1st page when the <back> <a href="javascript:history.back(-1);"> is click in the second page...
    The obvious solution is to put the address of the first page in the link.
    Why don't you do that?

  5. #5
    SitePoint Member
    Join Date
    Feb 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    plzzzzzzz help

    I have got a problem here

    I have a list of criterians.........when i click that criteran i have a window with a option of add and delete a rule to this criteria.
    When i try to delete one rule ,the rule gets deleted and then when i press back button on the criterian window ................it goes to the previous window and try to delete again which gives an exception.

    Now the problem is ...........................
    when i press the back button i want my browser to go to the list of criterans instead of going to the delete page.the code we used for the back button is

    <span class="task"><a href="#" onclick="window.history.back();return false;">Back</a></span>

    In what way i can improve my code to solve my problem..
    Last edited by spars_anu; Feb 1, 2007 at 08:29. Reason: instead of one i wrote diff window


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •