I have two buttons, one for Next and one for SAVE  when clicking Next I would like to let jQuery do its validation, but when SAVE is CLICKED jQuery will not do its validation. Are there event handlers for this?
40150
I have a form with multiple fields that I'm validating (some with methods added for custom validation) with Jörn Zaeffere's excellent jQuery Validation plugin. How do you circumvent validation with specified submit controls (in other words, fire validation with some submit inputs, but do not fire validation with others)? This would be similar to ValidationGroups with standard ASP.NET validator controls.  My situation:  It's with ASP.NET WebForms, but you can ignore that if you wish. However, I am using the validation more as a "recommendation": in other words, when the form is submitted, validation fires but instead of a "required" message displaying, a "recommendation" shows that says something along the line of "you missed the following fields.... do you wish to proceed anyways?" At that point in the error container there's another submit button now visible that can be pressed which would ignore the validation and submit anyways. How to circumvent the forms .validate() for this button control and still post?  The Buy and Sell a House sample at  allows for this in order to hit the previous links, but it does so through creating custom methods and adding it to the validator. I would prefer to not have to create custom methods duplicating functionality already in the validation plugin.  The following is a shortened version of the immediately applicable script that I've got right now:  var container = $("#&lt;%= Form.ClientID %&gt; div.validationSuggestion");  $('#&lt;%= Form.ClientID %&gt;').validate({               errorContainer: container,     errorLabelContainer: $("ul",container),     rules: {         &lt;%= YesNo.UniqueID %&gt;: { required: true },         &lt;%= ShortText.UniqueID %&gt;: { required: true } // etc.      },     messages: {         &lt;%= YesNo.UniqueID %&gt;: 'A message.',         &lt;%= ShortText.UniqueID %&gt;: 'Another message.' // etc.     },     highlight: function(element, errorClass) {         $(element).addClass(errorClass);         $(element.form).find("label[for=" + element.id + "]").addClass(errorClass);         $(element.form).find("label[for=" + element.id + "]").removeClass("valid");     },     unhighlight: function(element, errorClass) {         $(element).removeClass(errorClass);         $(element.form).find("label[for=" + element.id + "]").removeClass(errorClass);         $(element.form).find("label[for=" + element.id + "]").addClass("valid");     },     wrapper: 'li' });
1813
I have two submit buttons in a form. How do I determine which one was hit serverside?
85862
This page does it the way I want it to:   But I want to find a better way using jQuery, can anyone point me to a good script that uses jQuery to accomplish this?
79723
I need to hide field 'B' when the value in field 'A' is NOT equal to 'Other'.  This is a custom list form.  Is jquery the way to go?
9474
I have 3 buttons in a form. One of them is the submit button. How can I make it the default button to be clicked when I press the enter key. Is there a property for this?
74715
I have several input and option elements on my page, each (well almost) have an event attached to update some text on the page once they change. I use jQuery which is really really cool :)   I also use Microsofts  framework, utilizing the UpdatePanel. The reason why I do that is that certain elements are created on the page based on some server-side logic. I don't really want to explain why I use the UpdatePanel - even if it could (it can with quite some effort) be rewritten to use only  I still want that UpdatePanel.  You probably guessed it - once I have a postback on the UpdatePanel the jQuery events stops working. I actually was expecting this, since the "postback" is not really a new postback so my code in document.ready that binds the events won't be fired again. I also confirmed my suspicion by reading up on it in the jQuery help libraries.  Anyway I'm left with the problem of rebinding my controls after the UpdatePanel is done updating the . I preferably need a solution that does not require adding more .js files (jQuery plug-ins) to the page but something as simple as being able to catch the UpdatePanel's 'afterupdating' where I can just call my method to rebind all the form elements.
83258
Does anybody know of a method to trigger an event in Prototype, as you can with jQuery's trigger function?  I have bound an event listener using the observe method, but I would also like to be able to fire the event programatically.  Thanks in advance
3314
I'd like to do something like this to tick a checkbox using jQuery:  $(".myCheckBox").checked(true);   or  $(".myCheckBox").selected(true);   Does such a thing exist?
35404
I want to find the first span element after class counter, in code something like this:  &lt;div class="counter"&gt;&lt;/div&gt; &lt;p&gt;&lt;/p&gt; &lt;span&gt;&lt;/span&gt;   It seems like the next() function only finds the immediate next element, so something like this:  $(".counter").next("span")   Won't work. The way I have been using is a bit lengthy and I was wondering if there was a shorter way, it is this:  $(".counter").nextAll("span").eq(0)   I think the closest() method in jQuery 3 will do the trick, but I am using 1.2.6 -- is there a better way to do this (am I just using next() wrong?)
73078
Can someone please tell me how to submit an HTML form when the return key is pressed and if there are no buttons in the form? The submit button is not there. I am using a custom div instead of that.
25799
I have two radio buttons and want to post the value of the selected one. How can I get the value with jQuery?  I can get all of them like this:  $("form :radio")   How do I know which one is selected?
9151
How can I check the existence of an element in jQuery?  The current code that I have is this:  if ($(selector).length &gt; 0) {     // Do something }   Is there a more elegant way to approach this? Perhaps a plugin or a function?
64167
I need to debug a web application that uses jQuery to do some fairly complex and messy  manipulation. At one point, some of the events that were bound to particular elements, are not fired and simply stop working.  If I had a capability to edit the application source, I would drill down and add a bunch of  console.log() statements and comment/uncomment pieces of code to try to pinpoint the problem. But let's assume I cannot edit the application code and need to work entirely in Firefox using Firebug or similar tools.  Firebug is very good at letting me navigate and manipulate the DOM. So far, though, I have not been able to figure out how to do event debugging with Firebug. Specifically, I just want to see a list of event handlers bound to a particular element at a given time (using Firebug JavaScript breakpoints to trace the changes). But either Firebug does not have the capability to see bound events, or I'm too dumb to find it. :-)  Any recommendations or ideas? Ideally, I would just like to see and edit events bound to elements, similarly to how I can edit DOM today.
71962
I have an element with an onclick method.  I would like to activate that method (or: fake a click on this element) within another function.  Is this possible?
45827
I have the following validation rule:  AND(  $Profile.Name &lt;&gt; 'System Administrator',  OR(  ISPICKVAL(PRIORVALUE(Level__c), "Archived"),  ISPICKVAL(PRIORVALUE(Level__c), "Closed")  )  )   This validation rule is on the opportunity object, and what I want to achieve is, if the picklist Level__c is either set to Archived or Closed, the opportunity record can only be edited by the System Administrator.  For some reason though, the validation rule also triggers, when I want to set the Level__c to Archived or Closed. But this is not what I want.   Any idea what's wrong with the validation rule?
17965
I need to prevent accidental clicks in the Save button when a node is being saved.  I found this   which does exactly this. But the problem is that it uses javascript (jquery). Then if the user disable javascript this module is useless.  My problem is that in my website the user get points when creating nodes, so I have to prevent this in a more secure way.  How can I do this?   What do you think of these ideas?:  1) Maybe I would forbid the node being saved more than one time    programmatically instead of disabling the Save button.   2) Or better: I would allow the user to just save a new node every 5 minutes.
13185
I have created lightning quick action to add my component for some functionality.   so from my quick action. When I do some validation like       var opp = component.get("v.objOpportunity");     if(!opp.Name.length || !opp.CloseDate.length )     {         var toastEvent = $A.get("e.force:showToast");         toastEvent.setParams({             "message": 'Opportunity name and close date can not be empty.',             "type": "Error"         });         toastEvent.fire();         return;     }   So the toast message display behind the modal. Please check below screenshot.   Any solution for this issue? I don't want to write custom error message functionality to display to user.