I have a form that I would like all fields to be filled in. If a field is not filled out, I would like to display a red background of the field and an message.
\$('#id_form').blur(function()
{
if( $(this).val().length == 0 ) {
$(this).parents('p').addClass('warning');
}
print $q->start_form (-method => 'post', -action => "add.pl", -id => 'id_form');
print $q->legend({-class => "ui-widget-header ui-corner-all"},"");
print $q->input ({-id => 'name', -name => 'name',-type => 'text' , -size => 20, -style => ' margin-left:300 px' },"<br>");
I am not sure this is the right way!