Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Get selection in drop down menues in JEditorPane

Reply
Thread Tools

Get selection in drop down menues in JEditorPane

 
 
jalminger@gmail.com
Guest
Posts: n/a
 
      08-18-2008
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
 
Reply With Quote
 
 
 
 
Alex.From.Ohio.Java@gmail.com
Guest
Posts: n/a
 
      08-18-2008
On Aug 18, 5:48 am, (E-Mail Removed) wrote:
> 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/
 
Reply With Quote
 
 
 
 
jalminger@gmail.com
Guest
Posts: n/a
 
      08-22-2008
On 18 Aug, 21:56, (E-Mail Removed) wrote:
> On Aug 18, 5:48 am, (E-Mail Removed) wrote:
>
> > 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 (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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
1st Drop-down selection determins selected value in all drop-downs In ASP.Net Wizard jaysch ASP .Net 0 04-30-2011 02:19 PM
retrive preselected value in second drop down list from the first drop down list weiwei ASP .Net 0 01-05-2007 07:29 PM
New to .NET, can I have one drop down box control the data of another drop down box using a database? SirPoonga ASP .Net 2 01-07-2005 10:44 PM
Naviation with drop-down menues yn ASP General 4 04-19-2004 03:46 PM
Drop down menues LG Javascript 0 09-02-2003 09:42 PM



Advertisments