1 Replies - 371 Views - Last Post: 20 November 2012 - 05:32 AM

#1 RyanRobinson  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 39
  • View blog
  • Posts: 227
  • Joined: 31-March 10

Form not submitting with JS disabled

Posted 20 November 2012 - 04:23 AM

Hi guys,

I have wrote some code that validates a form using Javascript which works fine with JS enabled.

However, I wanted to make sure that my form will validate server side if someone has JS disabled.

So I disabled JS in IE9 and now my form won't even submit.

Here is the JS call in head of the HTML:

// define event listeners when document is loaded
window.onload = function() {
	
    // declare event listener for form submission
    htmlForm = document.getElementById('signup-form');
    htmlForm.onsubmit = function () {
		return validateForm(fields);
	}
};



I thought the JS code I was using was unobtrusive so my browser would simply submit the form but it hasn't worked. Any idea what this could be?

Is This A Good Question/Topic? 0
  • +

Replies To: Form not submitting with JS disabled

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6110
  • View blog
  • Posts: 23,670
  • Joined: 23-August 08

Re: Form not submitting with JS disabled

Posted 20 November 2012 - 05:32 AM

Well, if you've got Javascript disabled, then the submission of the form will be based on the action and method set in the HTML's form tag.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1