View Full Version : Web object action
amentze
03-12-2004, 12:08 PM
I'm using 5.0 Professional. I've got an embedded web object that is used to display HTML pages. Some of those HTML pages include embedded Flash objects. I've got no control over the content of these Flash objects and some of them include a Close Window link that in effect, closes the embedded web object. When that happens, the user is left with a blank screen.
I'm trying to figure out how to create an action that basically says:
"On Web object Close, Page.Navigate(PAGE_BACKWARD)"
Although my application does have navigation buttons that will allow the user to go back to the previous page, I'd lke to be able to do it automatically if they accidentally close the web object. Is this possible?
Intrigued
03-15-2004, 11:46 PM
Do you have a sample flash file (or can you make one) with the specifications, that is like the one(s) in the project?
If so, I would like to take a crack at finding a work-around.
I have a couple ideas.
Thank you,
amentze
03-16-2004, 08:58 AM
I suppose the Flash file portion of the problem is somewhat irrelevant. Any web page within the embedded web object that contains:
<a href="javascript:window.close()">CLOSE WINDOW</a>
results in the embedded web object being closed and the user is left with a blank kiosk screen. There is a back button on the screen but am hoping that I can run a page.navigate action when the web object is destroyed.
Thanks for looking into this.
TJ_Tigger
03-16-2004, 09:16 AM
I have not tried it, but you might be able to place some code on the On Navigation or On Loaded event for the web object to have it get the URL for the web object (Web.GetURL (http://www.indigorose.com/webhelp/ams50/Program_Reference/Actions/Web.GetURL.htm) ) and check to see if it is blank. Without a page loaded I don't know what the URL would return but I assume it would be blank.
if e_URL == "" then
Web.LoadURL("Web1", "www.indigorose.com");
end
Intrigued
03-16-2004, 10:10 PM
That was one of the ways I pondered! If TJ_Tigger was thinking that... then I think I might just be catching onto this Action Scripting language myself. (long way to go - I still am in the 'sucking my thumb' stages).
I know using SwishMAX I will sooner or later get into using more of its scripting language and run into this sort of situation myself.
So I am interested to see what the solution will turn out to be (or one of them if there is more than one).
ps. The other was a On Timer event ... but I feel that is some what of a 'sloppy' solution.
TJ_Tigger
03-17-2004, 11:15 AM
I have tried to capture the java window close action and am unable to stop the java script from happening. Here is what I put on the On Navigation event for the web object
if e_URL == "javascript:window.close()" then
Web.Stop("Web1");
Web.LoadURL("Web1", "www.indigorose.com");
end
I am trying to capture the javascript and then stop the browser then navigate to the page that I have specified.
It goes to the indigorose site but then the javascript still fires and closes the window. Sometimes it will make the web object inactive. I am not able to see the web object or load a file into it. I have checked it's visible and enabled states after this and both are true. I have attached a sample project. I will continue to play with this and see if I can get it to function.
Tigg
Intrigued
03-17-2004, 07:16 PM
This version truly was inspired by thinking outside of the box.
See: Attached
For now that is the best I can come up with (work around version).
Hope this helps or inspires one of the gurus to find a more professional way of handling such.
Note: When building click the continue button!
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.