Hello!

I've having troubles for fixing this bug. There are two autocompletion
field in my application,
if I type something in field A then its related value should autoset
in field B, which is working. But if I change
the value in A again then that reflect is not taking in field B. So
conclusion is once the value set in field B then it
never got changed. Its because inside else condition i am removing the
"example_class". Is there anyway we can fix this issue?

"example_class" is nothing but the class name passed in this function
and "newval" is the value to set in field B. Value is coming correct.
Only things which is not working is on change of anything in field A,
should always change in B also.

// Handles inputs with example text, which appears as a value to
elem.val().
function real_val(elem, newval) {
 if (elem.hasClass(example_class)) {
   // This input is still "empty", though jQuery would think
otherwise.
   if (newval === undefined) {
     // return the empty string
     return '';
   } else {
     // Set the given value, and clear the 'example' class/flag
     elem.val(newval);
     elem.removeClass(example_class);
     return elem;
   }
 } else {
   // Not empty, delegate to real val() method.
   return elem.val(newval);
 }
}

Please let me knowif you need any more info.

Any help will be greatly appreciated.

Thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to