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();">
<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