[pmwiki-users] Request for ideas -- edit page improvements

Hans design at flutesong.net
Mon Feb 7 12:52:21 CST 2005


Monday, February 7, 2005, 6:08:31 PM, Patrick wrote:
> Placing that "onLoad" component in the skin template (for all
> pages, including those that do not have authform or authform.authpw 
> components) somehow seems *totally wrong* to me.
I agree.

> And changing the 
> authentication form function to directly modify the <body> tag doesn't
> make me feel any better either.
the following change to the authentication form function seems to work,
but it does not make you feel better? It just adds a redefinition to
$HTMLBodyFmt:

  $HTMLBodyFmt = "</head>\n<body onLoad= 'self.focus(); document.authform.authpw.focus()'>";
  SDV($SessionAuthFmt,array(&$HTMLStartFmt,
    "<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' /></form>", &$HTMLEndFmt));

> The best I've come up with is to add a $BodyOnLoad variable that
> the authform and other functions can modify, but even so it seems like
> there ought to be a better solution than this.
If the solution above is not good enough I don't see how an addition
of a $BodyOnLoad variable can be avoided. How else could the onLoad code
be added to the body tag?


Best,
~Hans                           




More information about the pmwiki-users mailing list