×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    Do not open link in mobile device.

    Hi

    I try to open and close web page from S60 Widget Application in following way,
    but problem is that it's work in APATANA emulator but do not work on mobile device.

    I am tested on Nokia E71 mobile device.

    Code:
    <html>
    <head>
      <script type="text/javascript">
    	function newwin (urllink) {
    	   newwindow = window.open( urllink ,'newwin')
    	}
      </script>
    </head>
    <body>
      
      <a href="javascript:newwin('http://www.google.com')">google</a>
      <form>
        <input type="button" value="Close" onClick="window.newwindow.close()">
      <form>
    </body>
    </html>
    Please tell me anybody have any solution or any idea.

    Thank you in advance.
    Tanya

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: Do not open link in mobile device.

    Hi Tanya,

    when inside a WRT widget, you should use the widget.openURL() method to open links.

    Pit

  3. #3
    Registered User
    Join Date
    Sep 2008
    Location
    Manaus, Brazil
    Posts
    109

    Re: Do not open link in mobile device.

    In WRT widget.openURL('url'); has the same behavior window.open.
    Javier Zambrano Ferreira

  4. #4
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    Re: Do not open link in mobile device.

    Hi

    Thanks for your reply, yes I tried "widget.openURL(url);" before post thread over here, but my problem is that using this code do not able to close that webpage from widget application.

    I want to close opened url from widget, have you any idea to solve this problem?

    Thanking You
    Tanya

  5. #5
    Super Contributor
    Join Date
    May 2008
    Location
    Helsinki, Finland
    Posts
    1,100

    Re: Do not open link in mobile device.

    Quote Originally Posted by Tanya View Post
    Hi

    Thanks for your reply, yes I tried "widget.openURL(url);" before post thread over here, but my problem is that using this code do not able to close that webpage from widget application.

    I want to close opened url from widget, have you any idea to solve this problem?

    Thanking You
    Tanya

    Hi Tanya,

    Unfortunately it seems not possible to manipulate the launched browser the way you wanted
    from inside the widget. When the application has been started and the url opened, it is not
    possible to get a handle to it. So, the url you opened stays open as far as the widget is
    concerned.

    Best Regards,
    [FONT="Comic Sans MS"][COLOR="Blue"][/COLOR][I]Marko Lumivuori
    Technical Support
    +358 40 8019330
    [email]marko.lumivuori@nokia.com[/email][/I][/FONT]

  6. #6
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    Re: Do not open link in mobile device.

    Quote Originally Posted by Maveric View Post
    Hi Tanya,

    Unfortunately it seems not possible to manipulate the launched browser the way you wanted
    from inside the widget. When the application has been started and the url opened, it is not
    possible to get a handle to it. So, the url you opened stays open as far as the widget is
    concerned.

    Best Regards,
    Hi

    I tried with following way, but following code also do not work.

    Code:
    <script type="text/javascript">
    		function widget_popup(el, opts){
    			if (!el) {
    				return true;
    			}
    			var target = '_blank';
    			var url = "http://www.google.com/";
    			
    			if (!opts) {
    				opts = '';
    			}
    			if (el.target !== '') {
    				target = el.target;
    			}
    			newwindow = widget.openURL(url);			
    			return true;
    		}
    </script>
    
    <a href="#" onclick="return widget_popup(this);">Google</a><br/>	
    <input type="button" value="Close" onClick="widget.newwindow.close()">
    I have some questions about widget if you have any idea or snippets than please help me.
    - Is it possible to open and close web URL?
    - Is it possible to auto start and close widget in Symbian S60?
    - Is it possible to send auto(bulK) click event to php server from mobile application?

    I asked these questions because of If it's possible than I start to make application.

    My project definition is that generate bulk click events on 3rd party's php server side from mobile application.

    So currently I am sending http request to server for click event using "this.httpReq = new Ajax();".

    Server side: this 3rd party PHP server receives two type of events "Good Click" and "Bad Click", how's that i don't know.
    But If I click from desktop browser than generate "Bad Click".
    and If I click from mobile browser than generate "Good Click".

    I am sending http request for generate click events using timer method every 15 sec, I sends a http request.
    Now Problem is that when I send http request from my widget application than getting result in following way
    - Application start
    - after 15 sec send request to server - result: generate GOOD click event.
    - again after 15 sec send request to server - result: generate GOOD click event.
    - again after 15 sec send request to server - result: generate BAD click event.
    -continue this process - but generate BAD click event.
    -Close Application.
    - Again Application Start
    - same result generated
    - Close Application

    If you have any idea to do this process or any other way possible to do this things please give me that concept or idea.

    Thanking You
    Tanya

  7. #7
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    Re: Do not open link in mobile device.

    Hi

    Nobody have any idea!!!! or no any solution????

    Please help me guys, really I need your help for this concept.

    Thank you in advance
    Tanya

  8. #8
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: Do not open link in mobile device.

    Hi Tanya,

    don't know if I've correctly understood your needs, but: if you need to send periodic/automatic HTTP requests to a remote server, you should check out the XMLHttpRequest object. This allows to send "hidden" HTTP requests, without opening a browser window (and so, without the need to programmatically close it).

    Pit

Similar Threads

  1. How to retrieve the mobile device information at run time.
    By VaibhavNHCE in forum Mobile Java General
    Replies: 3
    Last Post: 2009-09-04, 06:12
  2. Replies: 1
    Last Post: 2008-01-04, 20:32
  3. Replies: 0
    Last Post: 2007-07-15, 23:06
  4. <anchor> problem in mobile device.
    By mobile@123 in forum Browsing and Mark-ups
    Replies: 6
    Last Post: 2007-02-02, 10:44

Posting Permissions

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