Results 1 to 7 of 7
  1.    #1  
    I have a WebView embedded in my app and I want it to open all links that are tapped on in the browser app in a new card, is this possible?
  2. #2  
    yep.

    listen for Mojo.Event.webViewLinkClicked and pass every link to a service call to open the browser at the specificed target url
    If you've liked my software, please consider to towards future development.

    Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more.

    @JayCanuck @CanuckCoding Facebook
  3.    #3  
    For some reason my listen isn't being triggered when I click on a link:

    Code:
    Mojo.Event.listen(this.controller.get("mobileView"), Mojo.Event.webViewLinkClicked, this.openLinkInBrowser.bind(this));
    Code:
    DashboardAssistant.prototype.openLinkInBrowser = function(url) {
    	this.controller.serviceRequest("palm://com.palm.applicationManager", {
       method: "open",
       parameters:  {
           id: 'com.palm.app.browser',
           params: {
               target: url
           }
       }
     }); 
    	
    }
  4.    #4  
    Yeah it seems like it just won't recognize the Mojo.Event.webViewLinkClicked. If I change it to Mojo.Event.tap, it will trigger the event. I'm not really sure why it'd be doing this..
  5. #5  
    In your webview widget setup, you may need to include interrogateClicks:true in the attributes


    Also it should be:
    Code:
    DashboardAssistant.prototype.openLinkInBrowser = function(event) {
    	this.controller.serviceRequest("palm://com.palm.applicationManager", {
    		method: "open",
    		parameters:  {
    			id: 'com.palm.app.browser',
    			params: {
    				target: event.url
    			}
    		}
    	}); 
    }
    Hope that helps
    If you've liked my software, please consider to towards future development.

    Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more.

    @JayCanuck @CanuckCoding Facebook
  6.    #6  
    Thanks Jason, I got it to work.
  7. psvillars's Avatar
    Posts
    82 Posts
    Global Posts
    86 Global Posts
    #7  
    can anyone tell me how to do this with project ares? I'm working on a myspace app(i know no one really uses myspace but i got a few friends that still do) and the sign out links don't work so I'd like to be able the webview to load the links thanks

    *edit: ok I got the sign out link to work but I can't get the ads to open in a new browser how is that opened? thanks again

Posting Permissions