or you can bind to $("#your-form").submit(function({ ... }); if you're
making your JS unobtrusive
On Jan 16, 6:41 pm, Viz skillipedia
wrote:
> You will need just this tiny js script:
>
> function disableOnSubmit(form ){
>
> for (var i = 0; i < form.length; i++){
> var e = form.e
You will need just this tiny js script:
function disableOnSubmit(form ){
for (var i = 0; i < form.length; i++){
var e = form.elements[i];
if (e.type.toLowerCase() == "button" || e.type.toLowerCase()
== "reset" || e.type.toLowerCase() == "submit") {
Looks good .
Thanks will try to add that to my site and see how it goes.
Dave
-Original Message-
From: Scott Sauyet [mailto:scott.sau...@gmail.com]
Sent: January-12-10 6:06 PM
To: jQuery (English)
Subject: [jQuery] Re: Disable Submit
On Jan 12, 2:49 pm, "Dave Ma
On Jan 12, 2:49 pm, "Dave Maharaj :: WidePixels.com"
wrote:
> I have a form i am submitting via Ajax. So after submit while its waiting
> for response i have my little spinner so user knows something is happening.
> But how can i disable the submit while its "thinking" waiting for a response
> so
btw, i forgot to add "return false;" to the end of both
events there, that would be needed
Dave
here's a quick 2 minute example of this topic and the other topic
http://jsbin.com/efona/edit (code)
http://jsbin.com/efona (run)
very little jQuery to wire that up :-)
Ok thanks.sounds good to me.
Will check it out.
Dave
-Original Message-
From: MorningZ [mailto:morni...@gmail.com]
Sent: January-12-10 4:42 PM
To: jQuery (English)
Subject: [jQuery] Re: Disable Submit
Personally i suggest using BlockUI to overlay the whole form... that way
1) not
Personally i suggest using BlockUI to overlay the whole form... that
way
1) not possible for your user to resubmit
2) gives dead obvious indication something is going on
3) simple as can be to use
On Jan 12, 2:49 pm, "Dave Maharaj :: WidePixels.com"
wrote:
> I have a form i am submitting via Ajax
Problem solved..
$().ready(function() {
var container = $("div.container");
var validator = $("#form_request_item").validate({
errorContainer: container,
errorLabelContainer: $("ul", container),
wrapper: "li",
meta: "validate",
submitHandler: function(form)
Hi Jörn,
I'm totally newbie to Jquery and i'm using jQuery validation plug-in
1.5.5 written by you to validate form. I've tried to disable submit
button based on example given but it didn't work(refer to code below).
Then have tried to change form to "#form_request_item" but it still
same. I have
thank you Jörn -- that works
On Aug 10, 9:01 am, Jörn Zaefferer
wrote:
> Try this:
>
> $(document).ready(function() {
> $("#myForm").validate({
> submitHandler: function(form) {
> $(form).find(":submit").attr("disabled", true).attr("value",
> "Submitting...");
> form.submit
Try this:
$(document).ready(function() {
$("#myForm").validate({
submitHandler: function(form) {
$(form).find(":submit").attr("disabled", true).attr("value",
"Submitting...");
form.submit();
}
})
});
Jörn
On Mon, Aug 10, 2009 at 9:40 AM, Rich Sturim wrote:
> $(docume
Thanks Mike!
Your script mostly works in IE once appended with });
The message displays and the form submits which is what it needs to
do. IE still has a little weird behavior in that it takes two clicks
to submit the form. On the first click, the form "jumps" a bit. It's
then necessary to repos
> The button is indeed of type="submit" and the form was working in IE
> prior to adding the above script.
>
> I also changed the attribute value to true (removing the quotes).
>
> Sadly, I'm still getting the same results in IE.
>
> On Jan 26, 4:10 pm, Karl Swedberg wrote:
>
> > A couple things
Thank you Karl for the reply.
The button is indeed of type="submit" and the form was working in IE
prior to adding the above script.
I also changed the attribute value to true (removing the quotes).
Sadly, I'm still getting the same results in IE.
On Jan 26, 4:10 pm, Karl Swedberg wrote:
>
A couple things you might want to look at:
1. Does your button have type="submit" ? It will need to if you want
to submit with it in IE.
2. The disabled attribute value should be true, not "true".
--Karl
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Jan 26, 2
The easiest way would be to have an id on the button like:
and then the jQuery would be:
$(document).ready(function() {
$("#submit").attr("disabled", "disabled");
});
On Oct 14, 2:12 am, Rahul Sinha <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Please go through the below given requirement and provid
Yes, but it seems that the script checks the input length only one time at
page load, and then button's state doesn't change if you continue to type or
delete input's content.
Michael E. Carluen-2 wrote:
>
>
> Another suggestion will be to get the length of the field:
>
> var t = ($('#post_n
Another suggestion will be to get the length of the field:
var t = ($('#post_name').val()).length;
if (t > 0) {
$("[EMAIL PROTECTED]").removeAttr('disabled');
}
This way, you can even have the option of enforcing a minimum char length of
the field/s.
Michael
> It seems
Thanks!!! That's exactly what I wanted =)
Don't know if it's a bug, but with val entering some text in textarea with
blank name field activated the button. With text() it stopped to do so. And,
as I've read from some of the messages, text() could be more effective when
dealing with textarea conte
> $('#post_submit').attr('disabled', 'disabled');
> $('#post_form').keyup( function () {
> if ($('#post_name', '#post_form').val() == '' && $('#post_content',
> '#post_form').text() == '') $('#post_submit').attr('disabled', 'disabled');
> else ($('#post_submit', '#post_form').remov
Thank you! :)
It seems that submit method is not what this case requires because it does
the job when user interacts with submit button (correct me please if I'm
wrong). The button should be disabled if both field and textarea (now they
are id's ;) do not contain any text, to prevent blank recor
On 14 Mag, 11:01, sashabe <[EMAIL PROTECTED]> wrote:
> Hello!
hi :)
you'd better use the submit() method and 'return false'.
Then a quick solution to your problem could look like this:
$(document).ready(function(){
$('form').submit(function(){
if ($('input:first', 'form').val() == ''
23 matches
Mail list logo