redirect to a new page on button click

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • krips
    New Member
    • Feb 2010
    • 1

    redirect to a new page on button click

    Hi..

    I have two pages page1.php & page2.php. I also have a link in page1.php that will take me to page2.php. Now, there is a button in page2.php which should take the user to page1.php upon clicking.

    Any one could help me to accomplish this please?

    I am not so sure if button is a good option to use here instead of link. But I initially tried using link in page2.php also (which will take me to page1.php). But I need to refresh my page1.php each time I click the link and I couldn't do that though I tried. So, I am thinking of using button now.

    I am new to this. Not sure if this is so stupid a question to ask..

    Thanks for your help..
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    usually a link does call a refreshed version, unless you employ some kind of caching mechanism. and a button should not behave differently (in principle) than a link. it also requires JavaScript to work.

    Comment

    • kovik
      Recognized Expert Top Contributor
      • Jun 2007
      • 1044

      #3
      Forced browser refresh and a link sometimes work differently. Depends on the browser's settings. However, this normally only affects external entities like images and CSS files.

      Comment

      • waqasahmed996
        New Member
        • Jun 2008
        • 160

        #4
        you can use JavaScript for that. but i am not sure that its effect will different than using a link

        Comment

        Working...