SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    on confirm return to previous page and refresh

    Hi

    I have a form with an image inside and delete option. When I select delete it redirects to delete.php and confirms delete if it is successful (all in php) and there is an OK button that should redirect to previous page without deleted image. I guess it possible only in Javascript but I dont know how to do it. I tried onClick="history.back() but still returns page with deleted image.

    If you have any idea how to do it, will be highly appreciated. and sorry for my bad english.

  2. #2
    SitePoint Wizard chris_fuel's Avatar
    Join Date
    May 2006
    Location
    Ventura, CA
    Posts
    2,750
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try document.location.replace('url') where url is the page that you would go to if you hit history.back(). history.back() will simply consult the browser cache (generally) and give you the results you just mentioned.


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
  •