Results 1 to 6 of 6

Thread: JavaScript validation needed

  1. #1
    Join Date
    Mar 2012
    Posts
    8
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default JavaScript validation needed

    Dear all,

    The problem is that when I press submit button I got the following message at: www.cypruspainters.net/repatchafail.html

    The page cannot be found

    The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.

    --------------------------------------------------------------------------------

    Please try the following:
    •Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.
    •If you reached this page by clicking a link, contact the Web site administrator to alert them that the link is incorrectly formatted.
    •Click the Back button to try another link.

    HTTP Error 404 - File or directory not found.
    Misk.com Hosting Service



    This happens even when I keep one or all the fields of the form empty. Even more if I fill/write something or not fill/write something the Captcha words.

    According to confirm.htm firstly, the user gets a confirmation which shows to the user that the form was completed succesfully.

    Secondly, I would like to inform the user that their info passed to webmaster and also if it possible, to show user's input (what the user has written to the form).

    I have attached the three related files which I use locally through Microsoft Expression Web 4 before uploading any changes.

    Answer from my provider:

    Within the .mf file, you have it specified to go to repatchafail.html when there is a failure with the captcha. Right now that page doesn't exist on your website, so you'll need to create a repatchafail.html and upload it. To help users on your site, you'll want to setup that page to let them know why they are seeing it.

    As for when captcha failed page shows up, whenever the text entered in the captcha is incorrect or it's simply not filled in, users will be redirected to the captcha failed page. We did some testing on your site and so long as the captcha is correctly written in, it is successfully submitted. The only time that captcha failed page shows up is when the captcha field is blank or incorrect. Please note that this will occur with our without the other form fields being blank. There isn't any server side form validation so the other form fields can be left blank. If you want to validate and ensure the other fields in your form are filled in, you'll need to setup some JavaScript validation on the page. If you're not familiar with doing that, we'd recommend searching online. There are a number of sites that will provide help with writing form validation. You can find a list of search results at http://bit.ly/GRYLdX . Microsoft Web Expression may also provide some assistance in setting that up so you may want to check their help documentation.

    On the confirmation/success page (http://www.cypruspainters.net/confirm2.htm), it's listing information not relevant to your form. Apparently you were using a form plugin with Microsoft Expression which relates to that. With our mail form service, you can't pass the input values to the confirmation page. That's not currently an option. That said, we add new features such as this based on demand. So, we've added your name to a feature request list and you'll be notified if and when that feature is added to our mail form service.

    So, for the confirmation page, you'll need to delete what's on there and replace it with a notification telling your users it was successful and that it has been sent to the webmaster. The confirmation/success page can say anything you want. It's simply an HTML page you create where the form redirects to when it is successfully submitted.
    Please help!

  2. #2
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Quote Originally Posted by neroman View Post
    Answer from my provider:
    Within the .mf file, you have it specified to go to repatchafail.html when there is a failure with the captcha. Right now that page doesn't exist on your website, so you'll need to create a repatchafail.html and upload it. To help users on your site, you'll want to setup that page to let them know why they are seeing it.

    As for when captcha failed page shows up, whenever the text entered in the captcha is incorrect or it's simply not filled in, users will be redirected to the captcha failed page. We did some testing on your site and so long as the captcha is correctly written in, it is successfully submitted. The only time that captcha failed page shows up is when the captcha field is blank or incorrect. Please note that this will occur with our without the other form fields being blank. There isn't any server side form validation so the other form fields can be left blank. If you want to validate and ensure the other fields in your form are filled in, you'll need to setup some JavaScript validation on the page. If you're not familiar with doing that, we'd recommend searching online. There are a number of sites that will provide help with writing form validation. You can find a list of search results at http://bit.ly/GRYLdX . Microsoft Web Expression may also provide some assistance in setting that up so you may want to check their help documentation.

    On the confirmation/success page (http://www.cypruspainters.net/confirm2.htm), it's listing information not relevant to your form. Apparently you were using a form plugin with Microsoft Expression which relates to that. With our mail form service, you can't pass the input values to the confirmation page. That's not currently an option. That said, we add new features such as this based on demand. So, we've added your name to a feature request list and you'll be notified if and when that feature is added to our mail form service.

    So, for the confirmation page, you'll need to delete what's on there and replace it with a notification telling your users it was successful and that it has been sent to the webmaster. The confirmation/success page can say anything you want. It's simply an HTML page you create where the form redirects to when it is successfully submitted.
    Your provider seems to have answered both of your questions directly. Is there something, specifically, that you don't understand?

  3. #3
    Join Date
    Mar 2012
    Posts
    8
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by traq View Post
    Your provider seems to have answered both of your questions directly. Is there something, specifically, that you don't understand?
    Hi,

    Do you know where to find a JavaScript validation on the page?

    The url: http://bit.ly/GRYLdX seems to be a dead link!

    Thanks

  4. #4
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    ? works fine for me (not a dead link).

    links to Google search results for "javascript form validation."

    Presumably, any of those sites might offer something useful to help you learn about validating forms using javascript (though I would recommend against w3schools).

    Edit:

    I know I already mentioned this in your last thread, but:
    a) if you want to do things best done server-side (like processing form submissions),
    b) you need to find a new host that allows server-side scripting.

    Additionally, if you want to learn server-side scripting (even if you don't, honestly), I would recommend dropping Expression Web (along with ANY other WYSIWYG html editor) and using a plain text editor. Notepad++ is a good choice for windows, but there are many more.

    Last edited by traq; 03-27-2012 at 07:21 PM.

  5. The Following User Says Thank You to traq For This Useful Post:

    neroman (03-28-2012)

  6. #5
    Join Date
    Mar 2011
    Posts
    2,144
    Thanks
    59
    Thanked 116 Times in 113 Posts
    Blog Entries
    4

    Default

    Quote Originally Posted by traq View Post
    Presumably, any of those sites might offer something useful to help you learn about validating forms using javascript (though I would recommend against w3schools).
    Why do yu recommend against them. Everybody does, but I don't think they're that much worse than any of the other tutorials out there

    Keyboard1333

  7. #6
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Quote Originally Posted by keyboard1333 View Post
    Why do yu recommend against them. Everybody does, but I don't think they're that much worse than any of the other tutorials out there

    Keyboard1333
    follow the link

    w3schools:
    • is terribly inaccurate and/or misleading in many places
    • is not affiliated with the w3c (and capitalize on, rather than correct, this misconception)
    • sells certifications that are useless from both technical and practical standpoints
    • crowds out better web resources (e.g., from the ground up, sitepoint, MDC)

  8. The Following User Says Thank You to traq For This Useful Post:

    neroman (03-28-2012)

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
  •