You are here: Re: associate a hidden input to (chosen) select option in form? « HTML « IT news, forums, messages
Re: associate a hidden input to (chosen) select option in form?

Posted by Quasimido CSS on 11/13/72 11:31

"Safalra" <usenet@safalra.com> in news:1131381265.601069.118530
@f14g2000cwb.googlegroups.com:

> Quasimido CSS wrote:
>> i'd like
>> to convert input name="yyyyyy" to a select name="yyyyyyy" (or whatever that can
have
>> more than one value assigned) that is
>> 1 also chosen when user chooses the select name="zzzzzz" option.
>> 2 still hidden (this isn't terribly important, though)
>
> You can hide a select element using CSS (display:none;), but obviously
> that depends on whether the UA supports CSS.

there's a simple solution to the 2nd part, thanks

inspired me to try type="hidden" in <select.. > and in <option ..>
but as expected, (because it wouldnt make sense to hide a choice) that had no effect.

> It might be a better idea
> to tell us why exactly you want to do this, and then we could propose
> better solutions.

end goal?
i have copies of various site forms jammed onto my browser homepage (since i'm
submitting to websites, i cannot change the cgi whatever on those websites servers)

in the case of this site,
Essentially the visitor selects yyyyyy by going to that webpage. yyyyyy has only a few
values, and each value is found on only one webpage. the site use a unique option
values for each zzzzzz no matter the page, but their cgi-whatever groups a bucnh of
zzzzz values with each yyyyyy input.

when testing values in the url, i discovered that thier cgi-whatever ignores or blocks
values of zzzzzz that aren't associated with the yyyyyy value in the url

eg, either:
mixnmatch causes weirdness.
www.site.com/search?yyyyyy=sheep&zzzzzz=gills
doesn't return any search results
or
when i chose the yyyyyy="0" value (it exists normally when zzzzzz is also
unspecified)
www.site.com/search?yyyyyy=0&zzzzzz=gills
it shows good search results, but the page hides the select option to choose a different
zzzzzz

the goal of my html:
i use only a few zzzzzz. so i'd like to put them in just one pulldown (select). i'm trying
to avoid having to go to each page, just to change the change the value of yyyyyy in
order to see my newly chosen zzzzzz.

in terms of the critter parts examples, I want to select zzzzzz=gills using the pulldown,
and have yyyyyy=fish be 'automatically' associated or tied to my zzzzzz select, before
the form submits to the site:
www.site.com/search?yyyyyy=fish&zzzzzz=gills
choose fins:
www.site.com/search?yyyyyy=fish&zzzzzz=fins
choose baaaaahh:
www.site.com/search?yyyyyy=sheep&zzzzzz=baaaaahh

 

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

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