HTML Form with a Select List and without Submit Button

  • Thread starter =?ISO-8859-15?Q?Martin_P=F6pping?=
  • Start date
?

=?ISO-8859-15?Q?Martin_P=F6pping?=

Hi,

somewhere I have seen that it is possible to create a formular
with a select box and without any submit button.

if you select via the select box an item, then the new page is loaded.

how can i do that?


bye,
martin
 
J

Jonathan N. Little

Martin said:
Hi,

somewhere I have seen that it is possible to create a formular
with a select box and without any submit button.

if you select via the select box an item, then the new page is loaded.

how can i do that?

Requires JavaScript, you create a submit function that you must attach
to the SELECT onchange event. You should provide and an alternate for
folks who have JavaScript disabled.
 
?

=?ISO-8859-15?Q?Martin_P=F6pping?=

Jonathan said:
Requires JavaScript, you create a submit function that you must attach
to the SELECT onchange event. You should provide and an alternate for
folks who have JavaScript disabled.

Thanks,

I did it like this now:

<form name="form_genlist" method="get" action="index.asp">
<select name="genfile" OnChange ="document.form_genlist.submit()">
//...

but how to do the alternate without JS?


Bye,
Martin
 
J

Jonathan N. Little

Martin said:
Thanks,

I did it like this now:

<form name="form_genlist" method="get" action="index.asp">
<select name="genfile" OnChange ="document.form_genlist.submit()">
//...

but how to do the alternate without JS?

I would say the most simply with NOSCRIPT.

<form name="form_genlist" method="get" action="index.asp">
<select name="genfile" OnChange ="document.form_genlist.submit()">
<noscript><input type="submit" value="go"></noscript>
....
 
J

Jukka K. Korpela

Martin Pöpping said:
somewhere I have seen that it is possible to create a formular
with a select box and without any submit button.

if you select via the select box an item, then the new page is loaded.

It's still a wrong way of doing things, even if you use <noscript> with
meaningful content. Doing navigation that way is a very poor surrogate for
links, for about a dozen reasons, see
http://www.cs.tut.fi/~jkorpela/forms/navmenu.html#ben
 
H

Harlan Messinger

Martin said:
Hi,

somewhere I have seen that it is possible to create a formular
with a select box and without any submit button.

if you select via the select box an item, then the new page is loaded.

how can i do that?

All this does is save most users a single click, while making the list
unusable by the many people who use only the keyboard for navigation.
 
Joined
Oct 6, 2007
Messages
1
Reaction score
0
the clicked page displayed in the original page

Hello,

What should you add to the following code to make the clicked page (Children's menus or Adults' menus) in the option display on the same page as the original page?

<form action="test.do" method="get">
<select name="test" onchange="submit();">
<option>Children's menus</option>
<option>Adults' menus</option>
</select>
</form>

I've tried with target="_self" as attribute in the form but it doesn't help.

Any input would be really appreciated.

Eliz

Jonathan N. Little said:
Martin Pöpping wrote:
> Jonathan N. Little schrieb:
>> Martin Pöpping wrote:
>>> Hi,
>>>
>>> somewhere I have seen that it is possible to create a formular
>>> with a select box and without any submit button.
>>>
>>> if you select via the select box an item, then the new page is loaded.
>>>
>>> how can i do that?

>>
>> Requires JavaScript, you create a submit function that you must attach
>> to the SELECT onchange event. You should provide and an alternate for
>> folks who have JavaScript disabled.

>
> Thanks,
>
> I did it like this now:
>
> <form name="form_genlist" method="get" action="index.asp">
> <select name="genfile" OnChange ="document.form_genlist.submit()">
> //...
>
> but how to do the alternate without JS?


I would say the most simply with NOSCRIPT.

<form name="form_genlist" method="get" action="index.asp">
<select name="genfile" OnChange ="document.form_genlist.submit()">
<noscript><input type="submit" value="go"></noscript>
....

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top