Announcement

Collapse
No announcement yet.

Default button action

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Default button action

    Does anyone have any ideas how I can make the default button within the checkout the "Next" button - rather the first one either "Cancel" or "Previous" depending on which page you are on)?

    Where I want to get to is that when customers are filling in the various form fields that they can press either the "Return" or "Enter" key on their keyboard and they are taken to the next step of the process.

    Cheers
    Ed

    #2
    Click here for a previous suggestion.
    Ben Popplestone
    Ecommerce website software

    Comment


      #3
      Thanks for the pointer.

      I have already tried the "make the back button a javascript history.go(-1)" idea and found that you get "this page has expired messages" which is no good.

      I'd be grateful if anyone has a solution to this...

      Comment


        #4
        The problem is that the '<Back' button is the first <input type="submit"> that the browser comes across - so it uses it as the default.

        You need to somehow re-arrange the HTML so NETQUOTEVAR:NEXTBUTTON is the first one. You could always put the buttons one on top of the other or something like that.

        Comment


          #5
          Hi Chris

          I was wondering about making the NEXT button the only submit button. CANCEL is not a problem - I could take the visitor to the INDEX.HTML or ACATALOG/INDEX.HTML. The BACK button is more tricky. If I use HISTORY.GO(-1) then I get a "page has expired" message - is there another link that I could use to overcome this?

          Ed

          Comment


            #6
            I don't have time to try this, but I would think that javascript can do this by using onsubmit on the form tag. You can check if one of the buttons was pressed. If not, return false.
            Bob Ladden

            Comment


              #7
              I found this javascript:
              http://javascript.internet.com/forms...y-disable.html
              Bob Ladden

              Comment


                #8
                I added the above javascript to Act_PrimaryCheckout.html and it works perfectly.
                Bob Ladden

                Comment


                  #9
                  Hi - I must be being thick!

                  I don't get how adding the Javascript to check which button is clicked helps me. I am trying to make it appear that NEXT has been clicked when the user hits the RETURN or ENTER key on their keyboard, so that they move to the next screen in the process - rather than the CANCEL or PREVIOUS as happens at the moment. Please explain.

                  Thanks
                  Ed

                  Comment


                    #10
                    The script disables the enter key. Even if the next button was the default, people often hit enter when entering text and the form is submitted before it is completely filled out. With this script, they have to click on the button of their choice when they are done.
                    Bob Ladden

                    Comment


                      #11
                      You can also write a script that redirects the enter key to clicking the next button, but I like this better.
                      Bob Ladden

                      Comment

                      Working...
                      X