Bug Tracker

Modify

Ticket #12257 (closed bug: worksforme)

Opened 9 months ago

Last modified 9 months ago

jquery Validation and Date Picker not working with Chrome new version (21.0.1180.75)

Reported by: ajaygupta2312@… Owned by: ajaygupta2312@…
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.0
Keywords: Cc:
Blocking: Blocked by:

Description

I have been using JQuery latest script and Validation Script on my forms. Since Thursday, none of JQuery Validations are working on Google Chrome. I found out that Chrome version is upgraded to 21.0.1180.75. All the validations are working fine in Friefox and IE. Also, date picker from Jquery is not working at all. It causing the page to go blank in New Chrome Version

Change History

comment:1 Changed 9 months ago by rwaldron

  • Owner set to ajaygupta2312@…
  • Status changed from new to pending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket!

Additionally, be sure to test against the "jQuery (edge)" version to ensure the issue still exists. To get you started, use this boilerplate:  http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to begin.

comment:2 Changed 9 months ago by ajaygupta2312@…

  • Status changed from pending to new

I am working on Salesforce platform and we are using jquery. I am not sure how can I test the code on jsfiddle. I can provide you simple apex code for testing.


<apex:page standardController="TISL_Script__c" extensions="TISLNewScriptController" id="thePage">

<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.js"/>

<apex:includescript value="http://ajax.microsoft.com/ajax/jquery.validate/1.9/jquery.validate.min.js"></apex:includescript>

<script type="text/javascript">

Rules

$(document).ready(function(){

$(".sendButton").click(function() {

$('[id$=submitForm]').validate();

$('[id$=firstname]').rules("add",{

required: true

});

});

});

</script>

<FORM action="" method="post" id="submitForm"> <P> <LABEL for="firstname">First name: </LABEL>

<INPUT type="text" id="firstname"/><BR/>

<LABEL for="lastname">Last name: </LABEL>

<INPUT type="text" id="lastname"/><BR/>

<INPUT type="submit" value="Send" class="sendButton" /> </P>

</FORM>

</apex:page>


Thanks Ajay

comment:3 Changed 9 months ago by rwaldron

  • Status changed from new to pending

You can make that work by just including a reduced version of the markup and the offending JS. If it can't be reproduced, then it's not a bug in jQuery

comment:4 Changed 9 months ago by rwaldron

  • Status changed from pending to closed
  • Resolution set to worksforme

When I reduce it and move the actual rule setting outside of the submission handler, it works fine.  http://jsfiddle.net/rwaldron/RFtb7/

The code above isn't even adding the rule until after the first click.

comment:5 Changed 9 months ago by ajaygupta2312@…

Thanks. Let me test it.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.