On Oct 6, 2009, at 8:53 PM, Chuck Hill wrote:
Hi Tim,
On Oct 6, 2009, at 1:41 PM, Tim Worman wrote:
All:
I've been poking around WORedirect looking for the best way to
handle this situation. Basically, I have an application which users
have to fill out some information on. When they're done, they
should click a button, and be directed back to another site.
So far that seems straight forward.
This button should edit EO's on my site and, if successful, send
the user back to the other site
Check.
with some values sent via a POST transaction.
Here is where it gets confusing. Why a POST, why not a get? The
same values as sent to your app, or different values? Does the
user's browser need to do the post? Can you POST the data from your
app and then just do a normal redirect?
It seems like it should be easy and it seems like there's more than
one way to skin this cat but I'd like to hear what others do in
similar situations.
ERXRedirect can be useful for some things. Depending on what you
need to do, this might give you some ideas:
http://www.jangro.com/tools/jsredirect.php
This turned out being a really elegant solution for me. Thanks for
knowing better what to google. :-)
In case it helps someone else, I made a new component with a binding
for and EO. Then the html of the component looks sorta like this
pseudo code:
<script language = "javascript" type = "text/javascript">
function submit_redirect() {
document.redirectform.submit()
}
</script>
<body onLoad="submit_redirect();">
<form name = "redirectform" action = "https://www.externalsite.com/urlstuff
" method = "post" runat="server">
<input type = "hidden" name = "valueToSetOnOtherSite" value =
"value" />
<input type = "hidden" name = "id" value = <wo:str value =
"$EO.idAttribute" /> />
<input type = "hidden" name = "password" value = <wo:str value
= "$EO.passAttribute" /> />
<p>You are being redirected automatically.<br />
If not, then you do not have JavaScript enabled.
Please click here:
<input type = "submit" value = "Continue to the other
place..." />
</p>
</form>
</body>
There is no step 3.
Tim
UCLA GSE&IS
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 ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]