[pmwiki-users] fox: new page focus

Peter Bowers pbowers at pobox.com
Sat Aug 2 13:55:26 CDT 2008


On Sat, Aug 2, 2008 at 12:22 PM, aless <alessors at gmail.com> wrote:
> Everything work as expected but when the new page is opened in edit
> mode, the edit box doesn't get the focus (I have to click before I can
> start typing). Is there a way to get the cursor blinking in the edit box
>  automatically?

Not sure how this would be applied, but here's some related code I
found in pmwiki.php for setting up the form for entering passwords
(see PmWikiAuth()):

===(snip)===
  SDV($AuthPromptFmt,array(&$PageStartFmt,
    "<p><b>$[Password required]</b></p>
      <form name='authform' action='{$_SERVER['REQUEST_URI']}' method='post'>
        $[Password]: <input tabindex='1' type='password' name='authpw'
          value='' />
        <input type='submit' value='OK' />\$PostVars</form>
        <script language='javascript' type='text/javascript'><!--
          document.authform.authpw.focus() //--></script>", &$PageEndFmt));
===(snip)===

-Peter



More information about the pmwiki-users mailing list