Loading ...
Sorry, an error occurred while loading the content.

RE: [OLmws] RE: Help on input popup- set focus

Expand Messages
  • Carleo, Rosanna (KCTP)
    Hi Fote, thank you very much. It works perfectly. :-) Rosannna ... From: overlibmws@yahoogroups.com [mailto:overlibmws@yahoogroups.com] On Behalf Of Foteos
    Message 1 of 3 , Sep 17, 2009
    • 0 Attachment
      Message
      Hi Fote,
      thank you very much.
      It works perfectly. :-)
       
      Rosannna
       
      -----Original Message-----
      From: overlibmws@yahoogroups.com [mailto:overlibmws@yahoogroups.com] On Behalf Of Foteos Macrides
      Sent: 16 September 2009 20:01
      To: overlibmws@yahoogroups.com
      Subject: Re: [OLmws] RE: Help on input popup- set focus

      Rosanna,
       
      The procedure is essentially the same as shown and discussed for the Google search popup in the:
      support document.
       
      Define an OLsf function in your document (or in a .js file which it imports):
       
      // For setting focus on input field
      function OLsf() {
       if (!(OLloaded&&OLgateOK)||overlib==no_overlib) return;
       if (!OLns4) setTimeout("document.forms.f.elements.q.focus()",20);
       return true;
      }
      where f is the name of your form and q is the name of the input field for which you wish to set the focus.
       
      In your function for making the overlib call following receipt of its content via AJAX, follow that call with an OLsf call.
       
      Fote
      --
       
      ----- Original Message -----
      Sent: Wednesday, September 16, 2009 8:52 AM
      Subject: [OLmws] RE: Help on input popup- set focus
       
      I have created a popup loading data with AJAX.
      My problem is that I want to set the focus on a input field when the popup is showed.

      Could you please help me.
      Rosanna
    Your message has been successfully submitted and would be delivered to recipients shortly.