SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    Apr 2001
    Location
    nr Canterbury, Kent UK
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have included a form in a website at

    LJW

    which is hosted using verio and relies on their form to email system

    at the moment , if a user hits return key to move between boxes instead of tab, then the form is immediately sent

    how can i get round this -as this is site is used by novices who will undoubtedly make this mistake

    and why is this happening - is it because the submit button is the first action on the page ?

    I think this is probably pretty basic stuff but this is my first form !!
    thanks
    JD

  2. #2
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Instead of a submit button, do:
    <input type="button" value="submit" onClick="this.form.action='blah.pl';this.form.submit()">

    Then take out the action="blah.pl" in your <form> tag. This will make it so that the form won't know where to submit until you have actually clicked the "submit" button.

  3. #3
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But...

    the drawback of this method will be that the FORM simply will not work if the browser does not have Javascript enabled. That might not be a good idea...
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  4. #4
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Take a look at the website.

  5. #5
    SitePoint Member
    Join Date
    Apr 2001
    Location
    nr Canterbury, Kent UK
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    thanks but

    sorry to be dim but not sure exactly what you mean "Then take out the action="blah.pl" in your <form> tag."

    are you saying that i should just do:
    <input type="button" value="submit" onClick="this.form.;this.form.submit()">


    instead of submit thing ?

  6. #6
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, I'm saying that you have something like:
    <form action="blah.pl">
    <input type="submit" value="submit">
    </form>

    which could be changed to:

    <form>
    <input type="button" onClick="this.form.action='blah.pl';this.form.submit()" value="Submit">
    </form>

  7. #7
    SitePoint Member
    Join Date
    Apr 2001
    Location
    nr Canterbury, Kent UK
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well i have

    <FORM METHOD="POST" ACTION="/cgi-bin/cgiemail/mailtemp.txt">

    and the mailtemp.txt is required for the form submission to work

    so not sure how i can change that ?

  8. #8
    SitePoint Member
    Join Date
    Apr 2001
    Location
    nr Canterbury, Kent UK
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    and the other bit before the </form> tag ends is

    <INPUT TYPE="submit" VALUE="Submit form" name="submit">

    the whole thing is using a cgi script from verio - do you think there is a better one i could use in my cgi directory and so customised the thing a bit more to my needs

    know any good cgi resources?


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
  •