[pmwiki-users] jumpbox Javascript guru needed

Patrick R. Michaud pmichaud at pobox.com
Mon Jan 29 11:57:29 CST 2007


On Sat, Jan 27, 2007 at 04:11:35PM -0000, marc wrote:
> The Javascript used for the jumpbox input tag is as follows:
> 
>   http://www.pmwiki.org/wiki/Test/JumpBox
> 
>   $InputTags['jumpbox'] = array(
>     'name' => 'n',
>     ':html' =>
>       "<form action='{$PageUrl}' method='get'>
>        <select onchange='window.location.href=this.options
> [this.selectedIndex].value'
>          \$InputSelectArgs>\$InputSelectOptions</select>
>        <input type='submit' value='$[Jump to page]' /></form>");
> 
> The problem is that when using this to jump to a page in a different 
> group, the URL displayed is of the form:
> 
>   http://www.example.com/SomeGroup/JumpFormHerePage?n=Main.HomePage
> 
> This causes problems in some circumstances.

The version that is on Test.JumpBox was just intended as a
demonstration, not necessarily a full-fledged example.  
That said, I'm not sure why you'd be getting the second form,
unless your browser is ignoring the JavaScript for some reason,
in which case it's the submit button that is causing the problem.

Is there a page or site where I could see this not working?
(Feel free to create a demonstration on pmwiki.org.)

Pm



More information about the pmwiki-users mailing list