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
Quote:
|
Originally Posted by Jonathan N. Little
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
|