Reply to Re: $_SERVER['PHP_SELF'] Question

Your name:

Reply:


Posted by The Natural Philosopher on 10/20/07 10:38

Kye wrote:
>> Have a page which takes the value in $_POST['dropdown'] and performs
>> another SQL query of the desired results.
>>
>> It may be this page (i.e. if $_POST['dropdown'] is set, or a different
>> page, depending on your needs.
>
> Is it possible to make the select element of the form automatically execute
> the "<INPUT type='submit' value='Go'>"; statement rather than having a
> button to click on???
>
Yes, with javascript.

However there are caveats.


If you actually do CHANGE the value displayed, then this code

<SELECT ...onchange="document.forms[0].submit()" >

will submit the form.

if there is only one <OPTION> element IN the select statement, this
doesn't work however. I have a workaround but its ugly.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация