×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    26

    Displaying the content of a web page

    Hi

    I have a code that retrives a URL and displays the content on the emulator screen.
    The thing is, I only see the source text of the web page and not the web page itself. In some web sites I don't see anything at all.
    www.google.com - I can the source text.
    http://jcp.org/en/jsr/detail?id=37 - I can't see anything.

    I tried to use the "FirstExample.java" code here: http://developers.sun.com/mobility/m...icles/network/

    and got the results that I mentioned above.

    What am I doing wrong.

    I'm using Netbeans 5.5.1.

    Thanks for any help

    I'm trying to delete the message and move it to the networking forum but I acn't do it.
    Last edited by avi1000; 2007-09-06 at 08:22.

  2. #2
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: Displaying the content of a web page

    you are downloading the html code for the webpages. After that you have displayed the web page in a text box. This text box does not support html code. Hence it is interpreting the html code as plain text.
    i suppose you are trying to create a web browser to interpret the code into html .

    As of why you are not receiving reply for the second url, i will need to check, but from that url also you will see the html code instead of html page in the text box.

  3. #3
    Registered User
    Join Date
    Aug 2007
    Posts
    26

    Re: Displaying the content of a web page

    Thank you for your answer, kkrish.
    Your assumption is correct. I want to interpret the code to HTML. My question is how do I do it? I should create a web browser? If so, what is the way to do it?

  4. #4
    Super Contributor
    Join Date
    Jun 2007
    Location
    Mumbai
    Posts
    539

    Re: Displaying the content of a web page

    well why u taking so much pain of creating browser use the phone browser invoke it with that url..

  5. #5
    Registered User
    Join Date
    Aug 2005
    Posts
    44

    Re: Displaying the content of a web page

    Yes there are many htmlparsers available for j2me.

    You might like to visit http://lightspeedleader.com/JCellBrowser/index.html
    for some help.


    regards
    nimish

  6. #6
    Registered User
    Join Date
    Aug 2007
    Posts
    26

    Re: Displaying the content of a web page

    I didn't know about the platformRequest method. :-)
    But what do I have to do in order to display the web page?
    I disabled the textBox so the web page source is not shown, but now nothing is appearing on the emulator screen? Is there something else that I hould do?

    Before the connection I have a message: "the application is trying to connect to http://www.google.com. This may result in charges.
    Is it OK to use airtime?
    Last edited by avi1000; 2007-09-08 at 01:29.

Similar Threads

  1. HTTP headers for S60 3rd Ed. Browser
    By Nokia Ron in forum Mobile Web Site Development
    Replies: 16
    Last Post: 2009-09-22, 14:28
  2. saving web page content to a file?
    By berkoron in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2009-06-24, 04:07
  3. Displaying Web page on mobile
    By parthmankad in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2006-09-24, 09:13
  4. Audio Input Stream on N80
    By tkaihock in forum Symbian Media (Closed)
    Replies: 9
    Last Post: 2006-06-30, 09:15
  5. Fetch a web page & get its size
    By manmli in forum Mobile Web Site Development
    Replies: 0
    Last Post: 2005-01-27, 00:58

Posting Permissions

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