Query Prevent Form Submit if Javascript disabled

Hello All,

I'm trying to prevent forms being submitted if javascript is disabled, I have targeted my submit button like -

<input name="Personal Statement" type="submit" disabled="disabled" class="submitBtn" id="PersonalStatementSubmit" form="Personal_Statement" value="Save">

Open in new window


And then my JQuery is -

$(function(){
  $('#PersonalStatementSubmit').attr('disabled', false);
  $('#EditPersonalStatementSubmit').attr('disabled', false);
  $("#EditPersonalStatementSubmit").prop("disabled",!$("#EditPersonalStatementSubmit").prop("disabled"))
  $('#SkillsandExpertiseSubmit').attr('disabled', false);
  $('#AvailabilitySubmit').attr('disabled', false);
  $('#EditWorkHistorySubmit').attr('disabled', false);
  $('#WorkHistorySubmit').attr('disabled', false);
  $('#GCSESubmit').attr('disabled', false);
  $('#QualificationSubmit').attr('disabled', false);
  $('#AlevelSubmit').attr('disabled', false);
  $('#DegreeSubmit').attr('disabled', false);
  $('#MastersSubmit').attr('disabled', false);
  $('#PHDSubmit').attr('disabled', false);
  $('#OtherSubmit').attr('disabled', false);
  $('#CoveringLetterSubmit').attr('disabled', false);
  $('#EditCoveringLetterSubmit').attr('disabled', false);
  $('#CVSubmit').attr('disabled', false);
});

Open in new window


But this isn't working the page is loading with all submit buttons disabled, even when javascript is enabled...

Help!
garethtnashAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Duy PhamFreelance IT ConsultantCommented:
Try to use removeAttr instead:
$(function(){
  $('#PersonalStatementSubmit').removeAttr('disabled');
  $('#EditPersonalStatementSubmit').removeAttr('disabled');
  ...
});

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
garethtnashAuthor Commented:
Thank you
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
jQuery

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.