aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes OnChange Select Menu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "OnChange Select Menu" Watch "OnChange Select Menu" New topic
Author

OnChange Select Menu

Terrence Thurber
Greenhorn

Joined: Feb 23, 2004
Posts: 3
Hi,
I'm new to JavaScript and can't seem to find the solution to this problem anywhere. I'm making a user login manager for a gaming site I use. I Base include the site to do the actual POST form, but here is my problem.
I want to be able to select a Name from a drop down menu, and have it put the corresponding email in one text input field and the pass in the other. If possible, executing the post would be fantastic.
Terrence
jyothsna kumari
Ranch Hand

Joined: Jul 21, 2003
Posts: 108
if i understood your problem correctly,you can do something like this.
for the dropdown menu call a function whenever user selects a name like this
<select name="s1" onchange="dothis();>
and in the dothis function set the value you want in the input field,
something like this
<script language="javascript">
function dothis()
{
document.formname.textfieldname.value="your value";
}
</script>
jyothsna
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
you can execute the form by
document.formname.submit();
Terrence Thurber
Greenhorn

Joined: Feb 23, 2004
Posts: 3
Awesome, now I can change the value, but how do i set the users and their individual options?
Also, the doc submint didnt work for me.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
where is the user information coming from.....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: OnChange Select Menu