[thelist] Javascript: pulll-down-pop-up!

Andrew Clover and at doxdesk.com
Thu Jan 17 06:24:26 CST 2002


Malcolm J. McAtee <malcolm at manlikemalcolm.net> wrote:

> function openWindow(theURL,winName,features) 

missing { at the end. (Seems a pointless function though, you could
just call window.open directly. Or does the real script do something more?)

>  <select name="theURL" onChange= "openWindow('','portfolio',
>  'width=600,height=400')">

You're missing the URL. You want

  openWindow(this.options[this.selectedIndex].value, 'portfolio', '...');

However, you might want to reconsider this sort of navigation. Many people
find it very inconvenient, it won't work where JavaScript is disabled or
unsupported (including search engines), and it really messes up users who
are navigating with the keyboard instead of the mouse - this especially
affects laptop users.

The problem is that when using the keyboard up/down arrows to select an
option, an onchange event is generated every time. So you can't go to
the option you want and select it like you do with a mouse - a new window
will open on every up/down keypress, and take the input focus with it.
This can be *very* irritating.

-- 
Andrew Clover
mailto:and at doxdesk.com
http://and.doxdesk.com/




More information about the thelist mailing list