Hi Rob,
you can use either the status or the title of the page to communicate
with lingo.. I've used the same trick before with the webbrowser
control. But as the status text dispays all kind of status information
and therefor changes all the time, I would suggest you use the title.
Here is some code to notify lingo when the user has pressed the
submit-button inside the WebXtra-Sprite:
1. setting the html-code for WebXtra-Sprite:
s=sprite(1)
s.html = "<html><body><form
onsubmit=""E&"document.title='_submit';return false""E&"><input
type=submit></form></body></html>"
2. behaviour attached to WebXtra-Sprite:
on titleChange me, newText
if newText="_submit" then
alert("SUBMIT-BUTTON PRESSED!")
end if
end
valentin
Rob Wingate wrote:
> Hi All,
>
> I think I'm looking for a strategy on how to notify Lingo from a
> <form>
> tag's 'onSubmit()' event.
>
> Background:
> I'm building HTML forms on the fly with Lingo, and sending them to an
> Internet Explorer (Tabuleiro's WebXtra) sprite on the stage. Works
> beautifully.
>
> Then comes the Submit button. I could leave it alone and post the
> form data,
> but I'd rather intercept it and process the data locally. I know I
> can use <form onSubmit="return false;"> to stop the post, but I don't
> know how to
> tell Lingo that Submit was clicked.
>
> IOW, how can the Javascript function I assign to onSubmit notify
> Lingo?
>
> I appreciate any leads--I'm in some new territory on this one.
>
> Thanks,
> Rob
>
> [To remove yourself from this list, or to change to digest mode, go
> to http://www.penworks.com/lingo-l.cgi To post messages to the list,
> email [EMAIL PROTECTED] (Problems, email
> [EMAIL PROTECTED]). Lingo-L is for learning and helping with
> programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL
PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping
with programming Lingo. Thanks!]