Page 1 of 1

Open weblink in browser

PostPosted: Thu Jun 10, 2010 11:57 am
by reapp
On my form, I use the browserbean to show a webpage with news items.
Is it possible if you click on the link, that it opens in the browser of the user?

Or is it possible that it opens in an another window?

Re: Open weblink in browser

PostPosted: Thu Jun 10, 2010 12:52 pm
by Harjo
Yes, use the onLocationChanging Event for that

with for example this method:
Code: Select all
function onLocationChanging(event,vURL)
{
   if (vURL && vURL != 'about:blank') {
      elements.bean_842.stopLoading()
      application.showURL(vURL)
   }
}


Hope this helps..

Re: Open weblink in browser

PostPosted: Thu Jun 10, 2010 3:04 pm
by ptalbot
@Harjo:
Great to see how you master the BrowserSuite! :wink:

@reapp:
Yes, Harjo is right, if you want to open it in the user's browser, that's the way to do it.

Otherwise, if you only want to open a new (BrowserBean) window, you can either set the target of you link to "_blank" or use a window.open() javascript function, both works fine!

Re: Open weblink in browser

PostPosted: Fri Jun 18, 2010 10:32 am
by reapp
Many thanks!! It works for me now.