Re: Euphoria and CGI

new topic     » goto parent     » topic index » view thread      » older message » newer message

Michelle Rogers wrote:

>
>
>I have a CGI question.  How do you make a page automatically refresh?
>Like...there are several things that I want to do like this.  And, this
>example is not one of them..but would be an easy example of what I'm looking
>for...
>Example:
>What if you put a clock at the top of your page and you wanted the clock to
>automatically refresh every minute, so that you didn't have to click a
>"reload" button to make the clock stay on the right minute.  How would you
>do this?  (I'm using Euphoria/Windows with Apache on my own computer, if any
>of that makes any difference)
>
>
>Michelle Rogers
>  
>

The only way to implement this feature is in the Header tags

Example:
<html>
<head>
<meta http-equiv="Refresh" content="1;  URL=http://128.0.0.1/this_page.exw">
</head>
<body>
<center><a href="http://128.0.0.1/this_page.exw">Refresh</a></center>
</body>
</html>

The first part of the content, seperated by a semi-colon, is the timeout 
waiting period.  1 means it'll wait 1 second, 0 means it'll 
automatically refresh.  If you want to use re-direct, the easy way to do 
that is:
puts(1,"Location: http://128.0.0.1/this_page.exw\n\n")
That's what you would output automatically, before _ANY_ headers are sent.
Headers consist of:
puts(1,"Content-type: text/html\n\n")
puts(1,"Content-type: text/plain\n\n")
puts(1,"Content-type: image/gif\n\n")
puts(1,"Content-type: image/jpeg\n\n")
etc
etc

Hope this helps.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu