/    Sign up×
Community /Pin to ProfileBookmark

onclick="submitForm use with jquery together

onclick=”submitForm use with jquery together , I want to handle if the use disable the javascript , the form is not allow to submit

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@DanInMANov 28.2011 — you might want to rephrase that, your words dont make much sense.

if you mean you dont want people to be able to submit the form if they dont have JS enabled, then jsut hdie the form with CSS using display:none on the form, and display the form on onload with JS. that way if they hav JS turned off the form will not show.
Copy linkTweet thisAlerts:
@NewCssauthorNov 29.2011 — that is nice sugestions, how to handle it
Copy linkTweet thisAlerts:
@DanInMANov 29.2011 — [CODE]
$(document).ready(function(){
$("#nojs").hide();
$("#idofform").show();
});

[/CODE]



[code=html]
<div id="nojs">This site requires Javascript to be enabled in order to process this form</div>
<form id="idofform" action="test.php" style="display:none;">
</form>
[/code]
Copy linkTweet thisAlerts:
@NewCssauthorDec 02.2011 — ? Thank you for the suggestion,

but hidden the form is not that user friendly,

I use the only way add the following on the head can i use you way , let jquery to handle the redirect ?

<noscript>

<meta http-equiv="Refresh"content="1;url=warring.jsp" />

</noscript>
Copy linkTweet thisAlerts:
@DanInMADec 02.2011 — no. if they have javascript turned off, then jQuery also wil not work becuase it is also javascript
Copy linkTweet thisAlerts:
@NewCssauthorDec 04.2011 — thank you?
×

Success!

Help @NewCss spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...