Go to a web page automatically
selander at tkf.att.ne.jp
Sat Jul 17 03:45:33 EDT 2010
Very detailed response, over my head but the links you included
have lead to much more study on my part.
This has gotten late, but I would be remiss if I didn't thank you
for the time you spent on this educational post!
On 7/11/10 11:03 AM, Jim Ault wrote:
> On Jul 10, 2010, at 5:56 PM, Sarah Reichelt wrote:
>> On Sun, Jul 11, 2010 at 10:20 AM, Tim Selander
>> <selander at tkf.att.ne.jp> wrote:
>>> Thanks for the reply. Sorry for not being clear. By 'open' I mean I just
>>> want to take the user to another page, as if they had clicked a link.
>>> I'm trying to write a simple form to get user input (based on Sarah's
>>> revForm.irev script) and want to take them to a 'Thank you' page
>>> automatically after they submit the info.
>> I found that the easiest way was to show or hide info on the same
>> page, depending on user input.
>> But if you want to take them to a different page, you can redirect.
>> Check out the script
>> Note that the redirect headers have to be "put" BEFORE anything else
>> is written to the page.
> For web content serving,
> there are actually 3 different things being specified in this thread.
> UPDATING THE SAME PAGE, REDIRECT, LOCATION
> I think the bottom of this post has the answer you probably want to use.
> UPDATING THE SAME PAGE - sending HTML tags and content to be displayed
> in the current browser window
> If the user does 'reload' or 'refresh', the original content will be
> re-displayed since the browser still thinks it is focused on the
> original url.
> The new content does not change the browser history since there has been
> no real navigation as far as the browser is concerned.
>> get url "http://www.runrev.com"
>> put it
> REDIRECT - tells the browser to keep the current url in history, but now
> focus on a new url
> This is commonly used to keep old links stored out on the internet
> working, but 'bounce' to new web pages or url.
> This gets a little complicated when you break down the different
> meanings of a url.
> http://someDomain.com/ or http://www.someDomain.com/ or
> -- will simply show the default page for the domain
> http://someDomain.com/aboutus.html or
> http://someDomain.com/aboutus.php or
> http://someDomain.com/aboutus.cgi or
> -- will simply show the page for that location
> -- will show the page and scroll to the anchor named
> http://someDomain.com/aboutus.html?loc=homeOffice xx no
> -- will show the page with info that a script provides by using the
> variable 'loc' with the value "homeOffice"
> The exact data sent back to the browser depends on the script programming
> NOTE: PHP and irev and cgi cause scripts to run on the server, but HTML
> does not, so sending variables.
> The reason scripts are run is that Apache has been told when it started
> that those 3 strings mean that Apache should follow its directives and
> run the correct script engine. At this time, the only server that knows
> about irev is the On-Rev system, thus irev scripts cannot be run on
> other systems.
> The On-Rev server knows how to run scripts using PHP, cgi, as well as irev.
> LOCATION - This is probably what you were looking for
> - change the Browser's memory variable that causes the browser to focus
> on the new url, keeping the original url in history, and reloading the
> new url.
> What you probably want to accomplish is sending a raw HTTP header to the
> More details here [ http://php.net/manual/en/function.header.php
> Possible headers to send to a browser
> Their are two kinds,
> Request (from browser) to instruct the Apache server
> Accept-Language: da
> Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
> Response (from server) to instruct the browser
> Content-Type: text/html; charset=utf-8
> Location: http://www.w3.org/pub/WWW/People.html
> Refresh: 5; url=http://www.w3.org/pub/WWW/People.html
> (refresh the same url after 5 seconds)
> Set-Cookie: UserID=JohnDoe; Max-Age=3600; Version=1
> (store data on the user's hard drive)
> (but it expires in 3600 seconds, 60 minutes)
> and specifically HTTP_location discussed here
> so in irev you would
> put "HTTP/1.1 302 Found" into sendResponse
> put cr & "Location: http://www.www.runrev.com" after sendResponse
> put sendResponse -- back to browser that started the dialog
> Just to let you know, REDIRECTION issues are much more complex
> This is a good overview...
> Bottom line for your specific task, use the scripting just below the
> Hope this helps. You have chosen to enter a world that can be very
> confusing, so tread carefully and study tons of examples.
> Jim Ault
> Las Vegas
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the Use-livecode