Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
dm8
New Contributor
Posts: 3
Registered: ‎05-27-2011
My Device: N/A
My Carrier: N/A

Wrapping existing website in WebWorks app

Hi,

This is my first attempt for a Playbook app. I'm trying to wrap an existing website into a WebWorks app. It is partially working. The issue I am facing at the moment is that the website has popup windows and the WebWorks app won't launch the new window  or load the content into the existing window. If I use the native browser on the playbook, it will of course launch a new tab with the content. Can anyone please suggest some ideas here?

 

Thanks in advance. 

Developer
Posts: 669
Registered: ‎02-19-2011
My Device: BlackBerry PlayBook 32GB
My Carrier: Sprint

Re: Wrapping existing website in WebWorks app

I don't think this is possible. An app doesn't have the concept of 'windows'.

You need to do your popups in HTML instead, with overlay DIV elements.

 

What is the point of wrapping a site in an app anyway? Why not use a regular shortcut?

Staff UI Prototyper (read: full-time hacker)


My BB10 apps: Screamager | Scientific RPN Calculator | The Last Weather App

dm8
New Contributor
Posts: 3
Registered: ‎05-27-2011
My Device: N/A
My Carrier: N/A

Re: Wrapping existing website in WebWorks app

@TheMarco, Thanks very much. So, I will need to get the website modified in how it pops-up the window? If so,  I will see what can be modified. 

 

The purpose of using the site is to make use of some WebWorks api.

 

Thanks again.

Developer
Posts: 669
Registered: ‎02-19-2011
My Device: BlackBerry PlayBook 32GB
My Carrier: Sprint

Re: Wrapping existing website in WebWorks app

Yeah exactly. Don't use window.open anywhere. Alerts and simple JS dialogs work but real windows do not. If you do need a 'popup' you use a z-indexed div that contains the content that woul normally be in a popup and show/hide it when needed. You can style this div with CSS to look like a popup window so the user won't really notice there's a difference.

Staff UI Prototyper (read: full-time hacker)


My BB10 apps: Screamager | Scientific RPN Calculator | The Last Weather App

Highlighted
dm8
New Contributor
Posts: 3
Registered: ‎05-27-2011
My Device: N/A
My Carrier: N/A

Re: Wrapping existing website in WebWorks app

Another thing that just came to my mind and I forgot to mention it earlier is that, since this is a WebWorks app and because I cannot package the existing html/js/css files, I've created a HTML page that embeds the content from the existing website. It is embeded in iFrame. Do you see any way of doing it this way without modifying the existing website in anyway?

Is there a way to capture the URL of the link clicked in the webpage that is embeded in an iFrame?

 

Thanks much for your help.