Get selection in drop down menues in JEditorPane

J

jalminger

Dear all,

I have rendered a html page with drop down selections, some radio
buttons and text input. I render this to a user where the user can
make selections and enter text. I use the method getText() to get the
altered html back. It works fine with the text input fields but the
selection boxes does not work. i.e. I cannot make out which selections
the user has made.

What am I doing wrong?

Cheers

Jonas
 
A

Alex.From.Ohio.Java

Dear all,

I have rendered a html page with drop down selections, some radio
buttons and text input. I render this to a user where the user can
make selections and enter text. I use the method getText() to get the
altered html back. It works fine with the text input fields but the
selection boxes does not work. i.e. I cannot make out which selections
the user has made.

What am I doing wrong?

Cheers

Jonas

Unless you provide short put comprehensive example what you are doing
we can't help you.
At least we could see immediately what you are talking about. Java or
JavaScript.

I suspect it's JavaScript. But, of course, it could be Java too if you
are very smart.
Personally I would never use Java to render html. Even standard
classes (like JEditorPane) do it not good enough.

Alex.
http://www.myjavaserver.com/~alexfromohio/
 
J

jalminger

Unless you provide short put comprehensive example what you are doing
we can't help you.
At least we could see immediately what you are talking about. Java or
JavaScript.

I suspect it's JavaScript. But, of course, it could be Java too if you
are very smart.
Personally I would never use Java to render html. Even standard
classes (likeJEditorPane) do it not good enough.

Alex.http://www.myjavaserver.com/~alexfromohio/

We are indeed using Java and not JavaScript. An example of the html
page we render can be:

<html>
<body>
<select name="ztpl_select0">
<option value="select1">Option 1</option>
<option value="option2">Option 2</option>
</select>
<input class="input_field" size="20" name="ztpl_input31"
value="rtg.svar">
</body>
</html>

Now, what happens when we use the getText() method is that if the user
has entered something in the input field, we get the entered text
back. As for the select we expected to see that the user selection
would get a selected tag but it doesn't. Have we totally misunderstood
how this should work?

/Jonas
 

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,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top