image button as a back button

Discussion in 'ASP .Net' started by Chicagoboy27, Oct 26, 2006.

  1. Chicagoboy27

    Chicagoboy27 Guest

    Seems like and easy question but I am running into problems getting it
    to work. I have a form where users enter search criteria and then
    displays results based on the search. I am wondering how can you create
    an image button that acts like a back button. like the browser back
    button. I have tried the usual things like

    onClientClick = Javascript:history.back()

    any suggestions would be helpful.

    Thanks
     
    Chicagoboy27, Oct 26, 2006
    #1
    1. Advertising

  2. Chicagoboy27

    apathetic Guest

    Chicagoboy27 wrote:
    > onClientClick = Javascript:history.back()


    Try something like this in your onClickClick:

    window.history.back(); return false;

    There is no need for javascript: at the beginning, and the return false
    prevents the usual button click behaviour from firing.

    apathetic
     
    apathetic, Oct 26, 2006
    #2
    1. Advertising

  3. Chicagoboy27

    Chicagoboy27 Guest

    Thank you that seemed to do the trick.... Thanks again....


    apathetic wrote:
    > Chicagoboy27 wrote:
    > > onClientClick = Javascript:history.back()

    >
    > Try something like this in your onClickClick:
    >
    > window.history.back(); return false;
    >
    > There is no need for javascript: at the beginning, and the return false
    > prevents the usual button click behaviour from firing.
    >
    > apathetic
     
    Chicagoboy27, Oct 30, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sylvia sil
    Replies:
    1
    Views:
    619
    Curt_C [MVP]
    Dec 29, 2004
  2. phancey
    Replies:
    3
    Views:
    2,586
  3. Author
    Replies:
    6
    Views:
    3,100
    George
    Jan 22, 2009
  4. Replies:
    0
    Views:
    301
  5. Useful Info

    Firefox back button takes me back 2 pages.

    Useful Info, Jun 3, 2007, in forum: Javascript
    Replies:
    0
    Views:
    347
    Useful Info
    Jun 3, 2007
Loading...

Share This Page