Results 1 to 3 of 3

Thread: Javascript submit won't work on server?

  1. #1
    Join Date
    Nov 2005
    New Jersey, United States

    Javascript submit won't work on server?

    I have the oddest bug. I have a simple html form. You can see it here:

    This form is just for demonstration purposes only. It doesn't really submit to anywhere. All I want it to do is validate a few fields and if those fields are filled in, redirect the user to a thank you page. This works fine if you physically click on the html file to open it, HOWEVER...if you try to access this html page via the domain name (as seen in the link above), clicking the submit button (once all necessary fields are filled in) doesn't work. It simply doesn't do anything.

    The redirection to the thank you page occurs in this file:
    http://www.learndoearn.org/almost_re...ts/js/forms.js (it's about halfway down the js file where it says window.location = "http://www.learndoearn.org/almost_real_products/thanks.html";

    Any idea what I'm doing wrong?


  2. #2
    Join Date
    Feb 2012
    Bokaro Steel City (Jharkhand), India!
    Why don't you just use the action attribute of the form tag?
    HTML Code:
    <form action="/thanks.html">
    "It will never rain roses: when we want to have more roses, we must plant more roses." - George Eliot

  3. #3
    Join Date
    Nov 2005
    New Jersey, United States
    Hi TheAliveWinner. Unfortunately, that doesn't work either.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center