function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
mike1051mike1051 

On blur issues in jquery..Need focus to change out of text box..?

I have a VF page..I have a button open pop up..on click of that button i am opening a pop up using output panel and css...using the code something like this..

LINK http://www.salesforcegeneral.com/salesforce-modal-dialog-box/

On that pop up i am using autocomplete using VF remoting and a confirm button on that popup..My problem is i am using blur event whenever i type some thing in that autocomplete text box i am selecting a autocomplete record and on onblur event calling a method but the curser remains in that text box.So when i click a confirm button onblur event is again called calling the controller method.

I want the curser to move out of the textbox after onblur event ..?? I need some jquery/javascript code...

close: function(){
      j$(esc('{!autocomplete_textbox}')).blur();
   }
Please help i am stuck with this issue...for 3 days...

Thanks
Abhi__SFDCAbhi__SFDC
If the issue is with the cursor foucs you can create a ouputLabel or a outputpanel and can redirect it in oncomplete event like -: 

document.getElementById('{!$Component.paneld}').foucs();

you can use focus() to redirect the cursor in onComplete event