Get selection in drop down menues in JEditorPane

Discussion in 'Java' started by jalminger@gmail.com, Aug 18, 2008.

  1. Guest

    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
    , Aug 18, 2008
    #1
    1. Advertising

  2. Guest

    On Aug 18, 5:48 am, 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/
    , Aug 18, 2008
    #2
    1. Advertising

  3. Guest

    On 18 Aug, 21:56, wrote:
    > On Aug 18, 5:48 am, 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
    , Aug 22, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SirPoonga
    Replies:
    2
    Views:
    738
    Ben Strackany
    Jan 7, 2005
  2. weiwei
    Replies:
    0
    Views:
    996
    weiwei
    Jan 5, 2007
  3. jaysch
    Replies:
    0
    Views:
    1,221
    jaysch
    Apr 30, 2011
  4. yn

    Naviation with drop-down menues

    yn, Apr 17, 2004, in forum: ASP General
    Replies:
    4
    Views:
    153
    William Morris
    Apr 19, 2004
  5. LG

    Drop down menues

    LG, Sep 2, 2003, in forum: Javascript
    Replies:
    0
    Views:
    105
Loading...

Share This Page