Theiling Online    Sitemap    Conlang Mailing List HQ    Attic   

Re: OT: TECH: JavaScript help

From:Gary Shannon <fiziwig@...>
Date:Monday, December 22, 2008, 19:01
--- On Mon, 12/22/08, Benct Philip Jonsson <bpj@...> wrote:

> From: Benct Philip Jonsson <bpj@...>
> I need some JavaScript for putting different > strings into an input text field depending on which > option of a select menue is choosen. > The bare HTML looks like this: >
The following is tested and works fine: <form name="my_form" action="test.html"> <input type="text" name="foo" value="tee"> <select name="bar" onclick="document.my_form.foo.value=document.my_form.bar.options[document.my_form.bar.selectedIndex].value"> <option value="tee" selected="selected">tee</option> <option value="tie">tie</option> <option value="toe">toe</option> </select> </form> --gary]

Reply

Mark J. Reed <markjreed@...>