PDA

View Full Version : Good one for you! interactions between web object and AMS4



Martin_SBT
10-03-2002, 07:03 AM
I have got a Web object that is full screen on one page of my AMS4 project. I would like to click on a button that is into my web page and that would jump to another page of my AMS4 project. Can i do that? How?

Thanx

Martin

Brett
10-03-2002, 09:44 AM
Wow. That is a tough one. But I have a workaround. (Mr. Rogers says: "Can you say 'hack' boys and girls? Good. I knew you could do it.")

Basically, what you need to do is to create a dummy web page called page2.htm (or whatever you want) in your distribution folder. Then make the link that jumps to the next page in your application href that page.

Next, you go into your Web browser object and edit the On Navigate Complete event. Add code that gets the URL that is being navigated to and search it for the dummy URL ("Page2.htm") using a String.Find action. If you find it in the URL, then jump to the next page.

I have attached a sample project that demonstrates this behavior. Have fun.

12396-web_page_jump.zip (http://www.indigorose.com/ubbthreads/uploads/12396-web_page_jump.zip)

Derek
10-03-2002, 09:50 AM
Fantastic workaround, Brett. How long did it take yu to come up with that one?

Yu should be Lead Programmer, or something, with ideas like that /ubbthreads/images/icons/wink.gif

Brett
10-03-2002, 10:06 AM
That was one of those ones where I started to reply, "You can't do that..." and then started to really think about it. That's the cool thing about AMS40 - there is almost always some sort of workaround, if not a direct way to do something.

Martin_SBT
10-03-2002, 10:07 AM
/ubbthreads/images/icons/smile.gif /ubbthreads/images/icons/smile.gif /ubbthreads/images/icons/smile.gif Kooooool! You guys are great!! thats exactly what i was looking for.
Thanx man

Corey
11-30-2002, 06:35 AM
Great workaround Brett but you don't even need to create a dummy web page. Simply send whatever variables you want to send to AMS to your current page (or any page) using the GET method, i.e. yourpage.html?variable1=9&variable2=Brett&variable 3=CloseWindow

I've attached an example file which allows you to post text to the web object which displays whatever you type in.

<<< SEE ATTACHED

So on and so forth. Using this method you can freely send variables from web objects to and from your AMS applications and thus create truly seamless integration between your web objects and all the other objects in your application. Using a remote site or server you can even integrate dynamic scripting into the equation such as PHP (such as in the attached example), JSP, ASP for true power...

14667-send vars.am4 (http://www.indigorose.com/ubbthreads/uploads/14667-send vars.am4)

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)

Michael
11-30-2002, 11:43 AM
Okay, now we're getting somewhere. This was the idea from Brett that Corey described in a posting I sent earlier. I couldn't find it until this post. I really like the fact the Autoplay has the capability of doing just about anything you can think of.

Great product!!

yosik
11-30-2002, 02:41 PM
Hi,
What if you are not online? Say you have a webbrowser object on your page but your app is self contained (on a CD).
Plus, what if I want to pass a command FROM the web object TO AMS?
I thought about adding a "window.status" java command to the web object when a button is clicked in the web page. Then AMS can check the status text of the web object and react accordingly.
Would you say this is a "good" method"? Any suggestions?

Thanks,

Yossi