how will jquery ajax form submission work if javascript is disabled

ajax, codeigniter, form-submit, jquery, php

Solution

it wont work .. nothing will happen though Ajax .. but the form will submit to it's action .

although it's not a good scenario to imagine but if you expect the user who is using your website doesnt have javascript enabled .. then read more about progressive enhancement ..

in short progressive enhancement means (in your case) : building a website that can function without javascript ... but if javascript is enabled then use it ...

in your form example what i advice you to do is to give an action to the form ... and with jquery `preventDefault()` disable the form default action and do what ever you want though ajax ..

by doing so if the user doesnt have javascript enabled then the form will submit to the requested url , and will be still working both ways ..

but at any rate IMHO ... just work assuming that your using have javascript enabled .. except if you rely on javascript too much

Problem

I am trying to submit a form without loading another php page. I am using codeigniter. But most of the tutorial have no action in there form tag. How will this work if javascript is disabled in the browser. Is there a work around for this?

Original source