SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Nov 2005
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript submit won't work on server?

    I have the oddest bug. I have a simple html form. You can see it here:
    http://www.learndoearn.org/almost_re..._services.html

    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?

    Thanks

  2. #2
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,119
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Hi,

    It works exactly the same offline and on for me.

    If the form is invalid it doesn't submit, so it looks like it doesn't do anything..
    it also won't submit without javascript, you should really use a standard <input type="submit"> for that button.


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
  •