[pmwiki-devel] Select & Option Dropdown-list Markup
Patrick R. Michaud
pmichaud at pobox.com
Mon Dec 11 14:20:56 CST 2006
On Mon, Dec 11, 2006 at 01:55:38PM -0600, Patrick R. Michaud wrote:
> On Mon, Dec 11, 2006 at 07:27:58PM +0000, Hans wrote:
> > do you consider it as a more complex form if it uses javascript as an
> > option, as I proposed for the <select> box markup
> >
> > onchange='window.location.href=this.options[this.selectedIndex].value'
> >
> > to have an option for instant jumping to a url page location?
> to be generated from a pagelist by using:
>
> [[#jumpbox]]
> (:if equal {<$FullName}:)(:input form {$ScriptUrl}:)(:if:)
> (:input jumpbox value={=$PageUrl} label="{=$Title}":)
> (:if equal {>$FullName}:)
> (:input submit post "Go to Page":)
> (:input end:)
> [[#jumpboxend]]
> ...
Actually, after thinking about it a bit further, it might be
better to define
$InputTags['jumpform']['name'] = 'n';
$InputTags['jumpform'][':html'] =
"<form action='{$PageUrl}' method='get'>
<select \$InputFormArgs
onchange='window.location.href=this.options[this.selectedIndex].value'>
\$InputSelectOptions</select>
<input type='submit' value='$[Go to Page]' /></form>";
In this case, the pagelist needed to generate a jumpform is just
[[#jumpform]]
(:input jumpform value="{=$PageUrl}" label="{=$Title}":)
[[#jumpformend]]
and we don't have to worry about creating any form or submit elements
because "(:input jumpform ...)" already takes care of that for us.
Pm
More information about the pmwiki-devel
mailing list