Results 1 to 4 of 4
  1. #1
    K-ML is offline Member
    Join Date
    Feb 2012
    Posts
    2
    Rep Power
    0

    Default Access HTML form in Java

    Hej everybody!

    I'm looking for a way to load, show and access (means: read and possibly edit) HTML forms in Java. In .NET, I can do all this by the WebBrowser class (e.g. access every single form by webbrowser.Document.GetElementById()).
    Is there a alternativ to JavaFX for doing so in Java? And if not, does anybody know some _good_ example code for that stuff in JavaFX? JavaFX' miserable documentation makes me cry! :D

    Thanks a lot!

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default Re: Access HTML form in Java

    I do dislike these comparisons to .NET.
    .NET is wired into the OS and all other Microsoft software, so it's not surprising it has something that can access a web browser (ie IE).
    Expecting the same thing from Java out of the box is like expecting to be able to do this with C++ out of the box.

    Anyway, are you asking for a Java-based web browser or what?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    K-ML is offline Member
    Join Date
    Feb 2012
    Posts
    2
    Rep Power
    0

    Default Re: Access HTML form in Java

    Hej!
    Yeah, I know that .Net is a lot closer to Windows that Java. But to be honest, I don't care about that, I just want a good working, easy to handle, fast codable solution.
    I just hoped that Java could offer something similar, so that I wouln't have to use my crappy Windows-PC at work ;).

    However, you're right, I'm looking for a Java-based browser module by which I could load html forms and read their values.
    I found JavaFX suit those requirements, but the few example codes I found all needed lots of Javascript in their html, which means to much work for my project (compared to the alternative in .Net).
    It's just annoying that I have to code on Windows for it...

    So if anyone knows some examples without (or little) Javascript, please post!

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default Re: Access HTML form in Java

    I'm still not sure what you are trying to get.
    Assuming it is just the <form> then an html parser of some sort would make sense.
    You mention JavaFX, but that's a GUI engine, so are you looking at displaying this?

    For example:
    Java Code:
    <html>
        <body>
            <form id="someForm">
                <p> This is a form</p>
                <input type="text" name="someField"/>
            </form>
        </body>
    </html>
    What would you be looking to do witht he above html page?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Replies: 6
    Last Post: 04-06-2011, 01:39 PM
  2. POST information to html form via java?
    By alacn in forum New To Java
    Replies: 7
    Last Post: 08-20-2010, 07:01 AM
  3. JLabel, HTML Form: How to access the data?
    By q.kontinuum in forum AWT / Swing
    Replies: 0
    Last Post: 01-27-2010, 03:23 PM
  4. Replies: 10
    Last Post: 08-12-2009, 05:02 PM
  5. Help in reading values from html form in java
    By ichkoguy in forum Advanced Java
    Replies: 7
    Last Post: 03-16-2009, 08:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •