• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: action to return to external site
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: action to return to external site


  • Subject: Re: action to return to external site
  • From: Tim Worman <email@hidden>
  • Date: Wed, 7 Oct 2009 14:47:24 -0700

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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >action to return to external site (From: Tim Worman <email@hidden>)
 >Re: action to return to external site (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: NSTimestamp bug in timestampByAddingGregorianUnits
  • Next by Date: Re: NSTimestamp bug in timestampByAddingGregorianUnits
  • Previous by thread: Re: action to return to external site
  • Next by thread: Mavenized project and custom components
  • Index(es):
    • Date
    • Thread