Go Back   Velocity Reviews > Newsgroups > Java
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

Java - Get selection in drop down menues in JEditorPane

 
Thread Tools Search this Thread
Old 08-18-2008, 10:48 AM   #1
Default Get selection in drop down menues in JEditorPane


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


jalminger@gmail.com
  Reply With Quote
Old 08-18-2008, 08:56 PM   #2
Alex.From.Ohio.Java@gmail.com
 
Posts: n/a
Default Re: Get selection in drop down menues in JEditorPane
On Aug 18, 5:48 am, jalmin...@gmail.com 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/


Alex.From.Ohio.Java@gmail.com
  Reply With Quote
Old 08-22-2008, 08:30 AM   #3
jalminger@gmail.com
 
Posts: n/a
Default Re: Get selection in drop down menues in JEditorPane
On 18 Aug, 21:56, Alex.From.Ohio.J...@gmail.com wrote:
> On Aug 18, 5:48 am, jalmin...@gmail.com 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



jalminger@gmail.com
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pass the Firefighter Selection Process tomcruise011 The Lounge 0 03-21-2009 05:23 AM
databound Drop Down List not changing on new selection KROSS General Help Related Topics 0 01-21-2008 04:48 PM
How do I get to the Drive Selection Screen on my Toshiba?!? Blaksta0nine0 General Help Related Topics 0 11-03-2007 07:51 AM
Text Selection in IE6 with mouse A V Veerkar Software 0 11-02-2006 02:22 PM
Who has biggest DVD selection online? Nicolas The Great DVD Video 8 09-03-2004 06:56 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46