×

Discussion Board

Results 1 to 6 of 6

Hybrid View

  1. #1
    Registered User
    Join Date
    Mar 2013
    Posts
    3

    Question Open URL without opening browser?

    Hi guys, I'm new and I am wondering if it is possible to open a Url (let's try with www.google.com for example) without the need of opening the browser
    I made a forum search and I looked at the wiki but all the examples talk about widget.openURL, which is not what I'm looking for

  2. #2
    Registered User
    Join Date
    Aug 2012
    Posts
    13

    Re: Open URL without opening browser?

    Try this:
    window.location="http://www.google.com";

    Nico

  3. #3
    Registered User
    Join Date
    Mar 2013
    Posts
    3

    Re: Open URL without opening browser?

    Hi Nico, thanks for the tip but I didn't understand how to use it
    I solved the problem by adding in the html file:
    <iframe src="http:www.google.com"></iframe>
    This way I loaded the page without opening the browser.

    That was just a test I made to check whether the page was correctly loaded by the widget or not.
    Now I'm trying to understand if there's a way to get only some information from that page and show it on the screen, for example checking if there is the string "I'm feeling lucky" somewhere in the page.
    As far as I understood I should parse the html page, is it correct? Anyone know how to do it?

  4. #4
    Registered User
    Join Date
    Aug 2012
    Posts
    13

    Re: Open URL without opening browser?

    I think it is not going to work - you don't have access to the contents of the frame if the source is outside your own domain. (cf Same origin policy). Probably you will need to consume a service instead, if that is provided.
    What do you want to accomplish?

  5. #5
    Registered User
    Join Date
    Mar 2013
    Posts
    3

    Re: Open URL without opening browser?

    I solved the issue thanks to this guide (it's in Italian, use google translated if interested): http://gabrieleromanato.com/2012/02/...emento-iframe/
    Anyway I've found a problem, I can't make "getElementById" work on my example (posted below)

    Here's the Html code:

    Code:
    <html>
      <head>
        <title>Example</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <script language="javascript" type="text/javascript" src="basic.js"></script>
      </head>
      <body>
        <p id="test">Example:</p>
        <!-- Define a paragraph for result text -->
        <p id="result"></p>
      </body>
    </html>
    And here's the Javascript part:

    Code:
    window.onload = function(){
      var paragraph = document.createElement('p');
      var xyz = document.getElementById("test");
      var string = document.createTextNode(xyz[0]);
      paragraph.appendChild(string);
      document.getElementById("result").appendChild(paragraph);
    }
    Everything should be fine but I can't figure out why it doesn't work, since I have <p id="test">Example:</p>
    I did the same thing with getElementsByTagName("p") and it worked, but I would like to understand why it doesn't work this way..

  6. #6
    Registered User
    Join Date
    Aug 2012
    Posts
    13

    Re: Open URL without opening browser?

    What does this have to do with the iframe you mentioned before? Are you telling the whole story? What do you want to accomplish? You will not be able to get access to the contents of an iframe if the source is on a remote server.

Similar Threads

  1. Open C and Opening connection
    By julie_777 in forum Symbian Networking & Messaging (Closed)
    Replies: 27
    Last Post: 2012-02-21, 16:50
  2. Opening multiple url's to web browser
    By KeijoKoodaaja in forum [Archived] Flash Lite on Nokia Devices
    Replies: 6
    Last Post: 2009-12-02, 07:21
  3. Opening Web Browser on Open
    By carlm in forum Symbian
    Replies: 1
    Last Post: 2009-06-17, 01:31
  4. Opening Image in Browser
    By ankitsomani007 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2008-10-14, 09:32

Posting Permissions

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