Skip to main content

Bug Tracker

Side navigation

#11363 closed bug (invalid)

Opened February 20, 2012 05:32AM UTC

Closed March 06, 2012 08:15AM UTC

problem with form submit

Reported by: saman khademi Owned by: saman khademi
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:
Description

Dear sir/madam

Please check this code

$('form').submit(function()

{

$('input:text').each(function()

{

if($(this).val()=='' || $.trim($(this).val())=='' || $(this).val()==null)

{

return false;

$(this).css({'border':'2px solid red'});

$(this).css({'border':'2px solid red'});

$error=1;

$(this).parent().next().html('This field must have a value');

}

});

});


when put return false in (each) its not work but when put it in (if) its work correctly

please fix this bug

Attachments (0)
Change History (2)

Changed February 20, 2012 06:38AM UTC by rwaldron comment:1

owner: → saman khademi
status: newpending

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.

Changed March 06, 2012 08:15AM UTC by trac-o-bot comment:2

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!