[pmwiki-users] Request for ideas -- edit page improvements
Hans
design at flutesong.net
Mon Feb 7 15:43:02 CST 2005
Monday, February 7, 2005, 7:52:14 PM, Patrick wrote:
> I think my point is that there ought to be a way in HTML/CSS to get
> the cursor into a form box without having to muck with the <body> tag
> at all. But if there's not and it's really important to fix, I'll see
> about coming up with a workaround. However, the workaround will ultimately
> require skins to redefine their <body> tags in order for it to work.
In order to get the focus on a form box it needs a bit of javascript,
which the <body onload='...' > tag delivers. But for our purpose it
does not need to be in the body tag, it just needs to be after the form.
There is no need to redefine $HTMLBodyFmt.
Like this:
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>
<script language='javascript'><!--
document.authform.authpw.focus()
//--></script>", &$HTMLEndFmt));
This should work in modern DOM complient browsers.
I checked it works in IE6, Firefox, Netscape 7, Netscape 4.8, Opera 7, on Windows
Best,
~Hans
More information about the pmwiki-users
mailing list