Re: drop down selection box
- From: "the red dot" <red@xxxxxxxx>
- Date: Mon, 5 Mar 2007 10:39:43 -0000
"J.O. Aho" <user@xxxxxxxxxxx> wrote in message
news:5528qpF22eoo4U1@xxxxxxxxxxxxxxxxxxxxx
the red dot wrote:quite
"Adrienne Boswell" <arbpen@xxxxxxxxx> wrote in message
news:Xns98E9CB0427D47arbpenyahoocom@xxxxxxxxxxxxxxxx
Gazing into my crystal ball I observed "the red dot" <red@xxxxxxxx>ahh i seem to remember seeing that on my google travels but couldnt
writing in news:yJCdncQCD-_83nbYRVnytAA@xxxxxxxxxxxxxx:
"Adrienne Boswell" <arbpen@xxxxxxxxx> wrote in messageYup, I see what you mean. Can you do it server side, and not be
news:Xns98E98C758EC32arbpenyahoocom@xxxxxxxxxxxxxxxx
Gazing into my crystal ball I observed "the red dot" <red@xxxxxxxx>im attempting to find a way to do it without javascript
writing in news:SoWdnZ3qus8etnbYnZ2dnUVZ8s-qnZ2d@xxxxxxxxxxxxxx:
this is driving me crazy but i am trying to find some examples of adrop
down selection box with a go button that doesnt use javascript...this
is
possible or am i barking up a very wrong tree?What's wrong with plain links? What about users without javascript
(Google comes to mind)? How about:
plain links will mess up design/layout especially as the film titles
are a bit long in some case so if a user increases the font size too
much the whole thing will go mad
dependent on js at all?
<form method="post" action="<?php_self?>"
<fieldset>
<legend>Choose a Film</legend>
<label for="film">Title: </label>
<select name="film" id="film" onchange="this.form.submit();">
<option value="#"></option>
<option value="#">Fighting the Taliban</option>
<option value="#">Meeting the Taliban</option>
<option value="php/afghan.php">Afghan Ladies' Driving School</option>
</select>
<input type="submit" "value="GO" />
</fieldset>
</form>
This will work for js browsers and non-jsbrowsers. Just put a little
php at the top looking for what the script submitted, and redirect from
there.
haveget my head around it, is it possible for you to post the link (if you
mean byit) so i can go and have another (deeper) investigation, what do you
sameput a little php at the top? as usual the more i know the less i seem to
understand.
You must use a redirect page specially if you want to use anchors in the
page.then
In your html pages:
<form method="post" action="redirect.php"
<fieldset>
<legend>Choose a Film</legend>
<label for="film">Title: </label>
<select name="film" id="film" onchange="this.form.submit();">
<option value="#"></option>
<option value="#">Fighting the Taliban</option>
<option value="#">Meeting the Taliban</option>
<option value="php/afghan.php">Afghan Ladies' Driving School</option>
</select>
<noscript><input type="submit" "value="GO" /></noscript>
</fieldset>
</form>
I assume the "this.form.submit()" works when the javascript is enabled,
in theory you wouldn't need the submit button, so set it inside noscripttags
that should enable the button for none javascripters (may not work n oldof
browsers like mosaic).
--- redirect.php ---
<?PHP
switch($_REQUEST['film']) {
case 'taliban':
header('Location: http://www.example.net/pagename.html');
exit;
case 'driver':
header('Location: http://www.example.net/afghan.html');
exit;
case '#hello':
/* not sure if this works */
header('Location: http://www.example.net/afghan.html#hello');
exit;
default:
header('Location: http://www.example.net');
exit;
}
?>
--- eof ---
Using a redirect script makes you need only one server side script instead
making all your pages to server side scripts.crikey, cheers mate, i'll have a look at this properly later...
--
.
- References:
- drop down selection box
- From: the red dot
- Re: drop down selection box
- From: the red dot
- Re: drop down selection box
- From: the red dot
- Re: drop down selection box
- From: J.O. Aho
- drop down selection box
- Prev by Date: Re: drop down selection box
- Next by Date: Re: islam word ?
- Previous by thread: Re: drop down selection box
- Next by thread: Re: drop down selection box
- Index(es):
Loading