[thelist] One Search, Two Options, Two Actions, Degrade Gracefully

Chris Johnston fuzzylizard at gmail.com
Fri Jun 2 13:07:25 CDT 2006


Would this not be fairly trivial to accomplish on the backend using
something like php? This way, the search box does not depend on anything and
will work in any browser. I am a little confused as to why you would want to
do this on the front end at all?

Chris

On 6/2/06, Andrew Strojny <astrojny at gmail.com> wrote:
>
> Ok, I need the experts to take a stab at this one.
>
> The basic search function I am looking for can be seen on
> http://www.cnn.com ( as well as others ). I need one search field,
> with two radio button options. Depending on what option is selected,
> the button submits a separate form with a different action. I am not
> using this for a simple web search, instead searching two different
> parts of a site. So I need each option to submit a completely
> different form altogether. Being an absolute JS beginner I have no
> idea how to accomplish this.
>
> The Kicker:
>
> I know this is probably relatively easy for someone who is well versed
> in JS. BUT, I also want it to degrade gracefully when JS is disabled
> in the users browser. The CNN search does not degrade gracefully. If
> you are trying to search the WEB with JS disabled it still searches
> CNN.com. I would like one of the options to disappear when JS is
> disabled, or better yet display a message about enabling javascript
> where the search box would be, or any other solution that works. This
> may involve having to put the forms in the JS, which is OK too.
>
> So if anyone can figure out how to do this and post the JS along with
> the HTML that would be awesome.
>
>


-- 
www.fuzzylizard.com



More information about the thelist mailing list