accessing the option selected from an options list

I'm trying to display the selection the user made on a different window. here is the code that creates the list:

<html:select name="ActionForm" property="unit" onclick="changeDisable()">

<html:options property="unitList"/>

</html:select>

I've tried the following code, but nothing comes up:

<bean:write name="ActionForm" property="unit"/>

I am able to write other info, just not the user's selection. Can anyone help me

[489 byte] By [j_jimersona] at [2007-10-2 5:52:07]
# 1
What's this got to do with Java? Besides nothing?onclick is Javascript and that has nothing to do with tag libraries or Java at all.
bsampieria at 2007-7-16 2:01:47 > top of Java-index,Java Essentials,New To Java...
# 2
This is has to do with struts
j_jimersona at 2007-7-16 2:01:47 > top of Java-index,Java Essentials,New To Java...
# 3
> This is has to do with strutsOkay, so you're not in a totally wrong forum. Just normally wrong.
CeciNEstPasUnProgrammeura at 2007-7-16 2:01:47 > top of Java-index,Java Essentials,New To Java...
# 4
actually, it doesn't have to do with Struts either. It has to do with a total lack of understanding on your part as to how browsers, HTTP, HTML and Javascript work. Struts and JSP don't change that.
bsampieria at 2007-7-16 2:01:47 > top of Java-index,Java Essentials,New To Java...
# 5

I'm not sure why you all are being so rude. I've been trying to solve this problem, and thought this forum could help. Yes I am new to Java, Struts, all of the web stuff. I did a search on google and saw that someone asked a question about struts in a java forum, and got helpful, rudeless answers without any problems. I'm sorry I bothered you, but you could have just told me I was in the wrong forum, and been helpful and directed me on the right place to look or moved on to the next post and said nothing. You didn't have to waste your time attacking my intelligence. NOW... If someone would like to be what forums are, which is helpful, and tell me where I might be able to find my answer, (besides the struts API) I would greatly appreciate it. Thank You.

j_jimersona at 2007-7-16 2:01:47 > top of Java-index,Java Essentials,New To Java...
# 6

If you want the selection in an HTML select list to be transfered to the server, then you submit a form to send the value. There is NO connection between Javascript and Java. The Java on the server can generate HTML/Javascript content to send to the browser. The browser can send data back using forms or links.

I think you are trying to run before you've learned to walk. This is either a Javascript issue or an HTML/HTTP issue, not a Java issue, not a Struts issue.

bsampieria at 2007-7-16 2:01:47 > top of Java-index,Java Essentials,New To Java...
# 7

Thank you for the help. Part of the problem is that I have no choice but to run before I walk. I'm new to this and I got thrown into it. Now the problem with my programming is I think my Action form is not processing the data being sent from the browser. I was under the impression that struts links the html to the java, so I figured maybe something was wrong with my java(ie.getters and setters).

j_jimersona at 2007-7-16 2:01:47 > top of Java-index,Java Essentials,New To Java...
# 8

<bean:write name="ActionForm" property="unit"/> will write the unit property from whatever ActionForm is.

You have to load the form in the browser, then submit it, then on submit you have to submitting to an action which will create the form object and set all the fields in the form bean to the form's values. But I don't know from what you posted how you have things set up. There's a dozen things you could be doing wrong.

bsampieria at 2007-7-16 2:01:47 > top of Java-index,Java Essentials,New To Java...