Hi Johan,

On Oct 14, 2009, at 12:03 PM, Johan Henselmans wrote:

The WebObjects application I have built is running in an iFrame in another website which is built statically. Now the question was to be able to send links to specific information about performances (it's for a theater) that is in the WebObjects application.

That in itself was accomplished with a Direct Action that points to a specific performance, something along the line of http://www.sometheater.nl/apps/WebObjects/reservation.woa/wa/showPerformance?performnanceid=999 . That is also what I am using to point from a HTML page to a specific performance in the iFrame.

The question was then asked that it would be nice to have the whole website around it, so that people get pointed back to the website.

Getting the complete website around it is not too difficult: just send a Location redirect if there is a request that does not come from the master website pages (in the call to the directAction I would add some variable FromMasterWebsite=yes that would assume the application running as an iFrame in the website).

First question is how to get the Location: redirect running? I tried
response.appendHeader("http://www.sometheater.nl";, "Location");
to add to the response header, but that does not seem to be enough.

Return a WORedirect or ERXRedirect?


Second question is how can I get point from the master website to the same performance? Is there some trickery with javascript that would accomplish in a way that the website would still be able to be loaded as static pages, but having the ability to call via a javascript:onload() or something that would point to the correct DirectAction link and performanceid?

You could redirect to http://www.sometheater.nl?performnanceid=999 and then parse that in the onLoad and set the iFrame location. The problem with that is is would stick unless you somehow later redirected to just http://www.sometheater.nl. Cookies are another idea, I don't recall if you can set a cookie when you redirect. I think you can, but the RFC is a little vague on that.


Chuck


--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to