Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

How do you parse variables to the web popup?
Started by schappim Feb 07 2010 06:40 AM

- - - - -
4 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

schappim

[GLOBAL: userInfoPane.html]
schappim
  • Observer

  • 9 posts
  • Guests

With the great release of SDK 1.1, and the new Web Popup, I'm wondering, how do you parse variables to the web popup?

I'm sure the Ansca guys are madly trying to document all the new features!
Cheers,

Marcus
uid: 4543 topic_id: 465 reply_id: 300465


[TOPIC: post.html]
#2

evank

[GLOBAL: userInfoPane.html]
evank
  • Contributor

  • 317 posts
  • Alumni

Hi, Marcus. Our idea was to document the WebPopup by example, specifically our Facebook Connect library -- but then Facebook turns out to need a lot of added documentation of its own, so that'll be out ASAP. In the meantime, what are you specifically trying to do with variables and the popup?
uid: 3007 topic_id: 465 reply_id: 897


[TOPIC: post.html]
#3

schappim

[GLOBAL: userInfoPane.html]
schappim
  • Observer

  • 9 posts
  • Guests

Hi Evan,

I'm trying to two two things:

1) Dynamically change content inside a DIV. For example have an app that is the framework for an ebook, and swap out the DIV content as a variable passed by lua.

2) I'm trying to work with embedded forms within the web popup. The keyboard does not work such forms. Key Presses are not recognised. Any ideas?

Cheers,

Marcus
uid: 4543 topic_id: 465 reply_id: 900


[TOPIC: post.html]
#4

evank

[GLOBAL: userInfoPane.html]
evank
  • Contributor

  • 317 posts
  • Alumni

Regarding case (1), currently the only way to pass data TO a WebPopup is in the URL. The idea behind WebPopup is to overlay either external websites or internally-created HTML documents. One thing that might work well in this case is to dynamically rewrite the current "page" each time as a local HTML file, then reload the WebPopup to show the new content. (For an example of loading a local document, see the "Device/WebOverlay" sample project; for an example of local file paths, see "GettingStarted/SimpleImageDownload".)

If you want communication back FROM the WebPopup into Corona, the usual trick is to make special href links in the web content that you can parse as events (by parsing event.url). For example, on a successful login to Facebook, the server can be made to call the URL "fbconnect://success", which is not a real URL -- it's a signal that the WebPopup should be closed and other events should happen on the Corona side (the Facebook project will make this clearer).

Regarding (2), web forms should work; for example, we have keyboard entry working here on Facebook's login form. Is this a form you made manually, or a form on a public site somewhere?
uid: 3007 topic_id: 465 reply_id: 903


[TOPIC: post.html]
#5

schappim

[GLOBAL: userInfoPane.html]
schappim
  • Observer

  • 9 posts
  • Guests

Thanks Evan, that has given me some usable ideas ;-)

Keep up the great work!

Cheers,

Marcus
uid: 4543 topic_id: 465 reply_id: 930



[topic_controls]
[/topic_controls]