You are here: Re: Can PHP Post without a form? « PHP Programming Language « IT news, forums, messages
Re: Can PHP Post without a form?

Posted by NC on 07/21/07 18:56

On Jul 20, 5:30 pm, "Larry L [in Honolulu]" <la...@no-place.org>
wrote:
>
> Well thanks, but maybe I didn't explain it well enough. I have pretty
> much exactly what you show, but sometimes when the page loads, and the
> options list is created, there is only one item there. If that's the
> case, then I don't want to even show it, I just want the one option
> posted to the next page.

In that case, just add something like this:

onLoad="document.forms[0].submit()"

to the <body> tag. Obviously, you will only need to add it if there
is only one choice. Alternatively, you can write (and call on load) a
JavaScript function which would check how many options there are in
the <select> you have output and, if there is only one, submit the
form.

Or you can forget the whole JavaScript thing and store relevant data
in a session...

Cheers,
NC

 

Navigation:

[Reply to this 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

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