facebook

URL with javascript

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #327269 Reply

    Hello

    How can I open an URL without using the dropdown option?
    I want to open a site and I want it in the JavaScript code.

    What’s the code to ‘launch’ the url?

    I hope you could help me.

    Sorry for my bad English 😀

    ~ IL

    EDIT: I want the code to use it on a button, when I click the button I want it to open an url in the app

    #327315 Reply

    Hi InfinitumLyceum,

    You can use the next code for redirect to other page:

    window.location = "http://m.genuitec.com/"
    #327350 Reply

    support-michael
    Keymaster

    Actually I would propose to leverage the most portable mechanism across devices (believe me they are quirky) using:

    
    phoneui.phoneui.showURL(URL, targetWindow)
    
    targetWindow values: _self, _blank or null
    Examples:
      phoneui.showURL('http://google.com')  //opens google site in new window, this is changing in 2.0.2 to open in current window
      phoneui.showURL('http://google.com', '_self');  // opens google site in current window
      phoneui.showURL('http://google.com', '_blank'); //opens google site in new window
    
    #327462 Reply

    See my edit please.

    The codes from you two isn’t working :/

    #327471 Reply

    support-michael
    Keymaster

    >EDIT: I want the code to use it on a button, when I click the button I want it to open an url in the app


    @Max87
    posted an update to your request on this parallel thread that you started:
    http://www.genuitec.com/support-genuitec/viewtopic.php?p=8220#p8220

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: URL with javascript

You must be logged in to post in the forum log in