1. Euphoria and CGI

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

new topic     » topic index » view message » categorize

2. Re: Euphoria and CGI

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 message » categorize

3. Re: Euphoria and CGI

Right, What he said.  However I wouldn't use that method for any page that
was larger than the screen.  The reload/refresh will cause the page to reset
to the top.

You've read 2 screens worth of a 5 screen webpage and it decides to reload
on you because of the timer.  Very annoying.

It is good for 10 second delay between reloads of a 10 second updated image.
Slow webcam.  20 second, 30 second.  Whatever.

Also good for webpage designing.  Set it to reload to the current page at
an anchor spot.  file:///C:/page.htm#edit_area
<a name="edit_area"></a>

Then when it reloads it will always jump down to where you are editing.
But I usually find it faster & easier to ALT-Tab to reach the browser, then
press F5 for refresh.  I usually am just flipping back and forth between my
editor and the browser.  A single Alt-Tab from each keeps flipping me
back and forth.

    unkmar

----- Original Message -----
From: "Mario Steele" <eumario at tuscanchat.com>
To: <EUforum at topica.com>
Sent: Thursday, July 29, 2004 2:07 AM
Subject: Re: Euphoria and CGI


>
>
> 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.
>
> --^----------------------------------------------------------------
> This email was sent to: l3euphoria at bellsouth.net
>
> EASY UNSUBSCRIBE click here: http://topica.com/u/?b1dd66.b2VP8n.bDNldXBo
> Or send an email to: EUforum-unsubscribe at topica.com
>
> For Topica's complete suite of email marketing solutions visit:
> http://www.topica.com/?p=TEXFOOTER
> --^----------------------------------------------------------------
>
>

new topic     » goto parent     » topic index » view message » categorize

4. Re: Euphoria and CGI

See this:

   http://web.nwe.ufl.edu/writing/help/web/authoring/html/tips/refresh.html

Basically, it's a META tag inside the <HEAD>:

    <META HTTP-EQUIV="Refresh" CONTENT="15">


-=ck
"Programming in a state of EUPHORIA."
http://www.cklester.com/euphoria/

new topic     » goto parent     » topic index » view message » categorize

5. Re: Euphoria and CGI

so what if you were gonna code one of those nice cute little arcade games
like at games.yahoo.com?  Can't do that with euphoria?
Michelle Rogers
----- Original Message ----- 
From: "cklester" <guest at RapidEuphoria.com>
To: <EUforum at topica.com>
Sent: Thursday, July 29, 2004 9:50 AM
Subject: Re: Euphoria and CGI


>
>
> posted by: cklester <cklester at yahoo.com>
>
> See this:
>
>
http://web.nwe.ufl.edu/writing/help/web/authoring/html/tips/refresh.html
>
> Basically, it's a META tag inside the <HEAD>:
>
>     <META HTTP-EQUIV="Refresh" CONTENT="15">
>
>
> -=ck
> "Programming in a state of EUPHORIA."
> http://www.cklester.com/euphoria/
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

6. Re: Euphoria and CGI

Michelle Rogers wrote:
 
> so what if you were gonna code one of those nice cute little arcade games
> like at games.yahoo.com?  Can't do that with euphoria?

Not until somebody creates a browser plug-in for Euphoria,
like you have for Flash or java (in which those games are programmed).

That should be easy, though. Bug one of the gurus for it. Or even
Rob Craig himself! Rob?!?!?!

-=ck
"Programming in a state of EUPHORIA."
http://www.cklester.com/euphoria/

new topic     » goto parent     » topic index » view message » categorize

7. Re: Euphoria and CGI

*flutters her eyelashes at ck*  umm...if it's easy can i just bug you for
it?

*giggles*

Michelle Rogers
----- Original Message ----- 
From: "cklester" <guest at RapidEuphoria.com>
To: <EUforum at topica.com>
Sent: Thursday, July 29, 2004 11:52 AM
Subject: Re: Euphoria and CGI


>
>
> posted by: cklester <cklester at yahoo.com>
>
> Michelle Rogers wrote:
>
> > so what if you were gonna code one of those nice cute little arcade
games
> > like at games.yahoo.com?  Can't do that with euphoria?
>
> Not until somebody creates a browser plug-in for Euphoria,
> like you have for Flash or java (in which those games are programmed).
>
> That should be easy, though. Bug one of the gurus for it. Or even
> Rob Craig himself! Rob?!?!?!
>
> -=ck
> "Programming in a state of EUPHORIA."
> http://www.cklester.com/euphoria/
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

8. Re: Euphoria and CGI

*flutters her eyelashes at Rob*

c'mon Robbie...pleaseie-weezie..can we get a plug-in?  Besides *jumps up and
down*  it'll be good advertising...we'll have euphoria all over the 'net
then  *grins*  *flutter*  *flutter*
Michelle Rogers
----- Original Message ----- 
From: "Brian Broker" <bkb at cnw.com>
To: <EUforum at topica.com>
Sent: Thursday, July 29, 2004 1:53 PM
Subject: RE: Euphoria and CGI


>
>
> cklester wrote:
> >
> > Michelle Rogers wrote:
> >
> > > so what if you were gonna code one of those nice cute little arcade
> > > games
> > > like at games.yahoo.com?  Can't do that with euphoria?
> >
> > Not until somebody creates a browser plug-in for Euphoria,
> > like you have for Flash or java (in which those games are programmed).
> >
> > That should be easy, though. Bug one of the gurus for it. Or even
> > Rob Craig himself! Rob?!?!?!
> >
> > -=ck
> > "Programming in a state of EUPHORIA."
> > http://www.cklester.com/euphoria/
>
> Yeah, I suggested something like that back in 2000.  Good thing I didn't
> hold my breath...
>
>
http://www.listfilter.com/cgi-bin/esearch.exu?thread=1&fromMonth=5&fromYear=5&toMonth=7&toYear=5&keywords="embedded+euphoria"
>
>
> -- Brian
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

9. Re: Euphoria and CGI

Michelle Rogers wrote:
> 
> *flutters her eyelashes at ck*  umm...if it's easy can i just bug you for
> it?

Well, you'll notice I said bug a *guru*! That would have to
be someone else. (I'm thinking Matt Lewis might be a good start...)

Can anybody else comment on this? :)

-=ck
"Programming in a state of EUPHORIA."
http://www.cklester.com/euphoria/

new topic     » goto parent     » topic index » view message » categorize

10. Re: Euphoria and CGI

Michelle Rogers wrote:
> 
> *flutters her eyelashes at Rob*
> 
> c'mon Robbie...pleaseie-weezie..can we get a plug-in?  Besides *jumps up and
> down*  it'll be good advertising...we'll have euphoria all over the 'net
> then  *grins*  *flutter*  *flutter*
> Michelle Rogers

Just don't let Kat find out!!! <meow> <grrrrr>

new topic     » goto parent     » topic index » view message » categorize

11. Euphoria and CGI

Why doesn't this work?

#!./exu

 puts(1, "<html><head><title>Quackery Game</title></head>\n")
 puts(1, "<body bgcolor=\"#FFFFFF\">\n")
 puts(1, "</body></html>\n")


I tried with /euphoria in /public_html and in the top level.

In /public_html I get:
#!./exu puts(1, "\n") puts(1, "\n") puts(1, "\n")

In the top level it does nothing.

/euphoria consists of /bin and /include

Also
#!/home/jstory/euphoria/bin/exu
doesn't work on my computer even tho the path is correct.

new topic     » goto parent     » topic index » view message » categorize

12. Re: Euphoria and CGI

Jerry Story wrote:
> 
> Why doesn't this work?
> 
> }}}
<eucode>
> 
> #!./exu
> 
>  puts(1, "<html><head><title>Quackery Game</title></head>\n")
>  puts(1, "<body bgcolor=\"#FFFFFF\">\n")
>  puts(1, "</body></html>\n")
> 
> </eucode>
{{{

> 
> I tried with /euphoria in /public_html and in the top level.
> 
> In /public_html I get:
> #!./exu puts(1, "\n") puts(1, "\n") puts(1, "\n")
> 
> In the top level it does nothing.
> 
> /euphoria consists of /bin and /include
> 
> Also
> #!/home/jstory/euphoria/bin/exu
> doesn't work on my computer even tho the path is correct.

- be careful that your #! line has just \n as the line terminator,
  *not* \r\n (DOS/WIN style)

- be sure that exu has execute permission by all users

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view message » categorize

13. Re: Euphoria and CGI

Jerry Story wrote:
> 
> Why doesn't this work?
> 
> }}}
<eucode>
> 
> #!./exu
> 
>  puts(1, "<html><head><title>Quackery Game</title></head>\n")
>  puts(1, "<body bgcolor=\"#FFFFFF\">\n")
>  puts(1, "</body></html>\n")
> 
> </eucode>
{{{

> 
> I tried with /euphoria in /public_html and in the top level.
> 
> In /public_html I get:
> #!./exu puts(1, "\n") puts(1, "\n") puts(1, "\n")
> 
> In the top level it does nothing.
> 
> /euphoria consists of /bin and /include
> 
> Also
> #!/home/jstory/euphoria/bin/exu
> doesn't work on my computer even tho the path is correct.

I don't see you outputting a content type, 

eg puts(1, "Content-type: text/html\n\n")

(unless that was assumed in your example)

new topic     » goto parent     » topic index » view message » categorize

14. Re: Euphoria and CGI

Gary Shingles wrote:
 
> I don't see you outputting a content type, 
> 
> eg puts(1, "Content-type: text/html\n\n")
> 
> (unless that was assumed in your example)

I forgot that.

Here is a modified version:
#!/public_html/cgi-bin/euphoria/bin/exwc.exe
without warning
 puts(1, "Content-type: text/html\n\n")
 puts(1, "<html><head><title>Quackery Game</title></head>\n")
 puts(1, "<body bgcolor=\"#FFFFFF\">\n")
 puts(1, "</body></html>\n")


This is what it does.
#!/public_html/cgi-bin/euphoria/bin/exwc.exe without warning puts(1,
"Content-type: text/html\n\n") puts(1, "\n") puts(1, "\n") puts(1, "\n")
On a blue screen.

new topic     » goto parent     » topic index » view message » categorize

15. Re: Euphoria and CGI

It seems the web server you're using is not executing that file but just giving
it's contents. Be sure your server is setup to execute it.

Best regards,
   Guillermo Bonvehi

new topic     » goto parent     » topic index » view message » categorize

16. Re: Euphoria and CGI

Why doesn't this run on my computer?

#!/home/jstory/euphoria/bin/exu
without warning
 puts(1, "Content-type: text/html\n\n")
 puts(1, "<html><head><title>Quackery Game</title></head>\n")
 puts(1, "<body bgcolor=\"#FFFFFF\">\n")
 puts(1, "</body></html>\n")


This is what it does.
#!/home/jstory/euphoria/bin/exu without warning puts(1, "Content-type:
text/html\n\n") puts(1, "\n") puts(1, "\n") puts(1, "\n")


The #! line has the correct path.

exu works on everything else.

new topic     » goto parent     » topic index » view message » categorize

17. Re: Euphoria and CGI

Jerry Story wrote:
> 
> This is what it does.
> #!/home/jstory/euphoria/bin/exu without warning puts(1, "Content-type:
> text/html\n\n")
> puts(1, "\n") puts(1, "\n") puts(1, "\n")

Have you modified your htaccess files? Sounds like Apache (or whatever web
server you're using) doesn't know what to do with Euphoria source files.

new topic     » goto parent     » topic index » view message » categorize

18. Re: Euphoria and CGI

c.k.lester wrote:
> 
> Jerry Story wrote:
> > 
> > This is what it does.
> > #!/home/jstory/euphoria/bin/exu without warning puts(1, "Content-type:
> > text/html\n\n")
> > puts(1, "\n") puts(1, "\n") puts(1, "\n")
> 
> Have you modified your htaccess files? Sounds like Apache (or whatever web
> server you're using) doesn't know what to do with Euphoria source files.

What, who is htaccess?
I'm using Opera. Opera understands html files.
Firefox does the same thing, with a different shade of blue.

new topic     » goto parent     » topic index » view message » categorize

19. Re: Euphoria and CGI

Jerry Story wrote:
> 
> c.k.lester wrote:
> > 
> > Jerry Story wrote:
> > > 
> > > This is what it does.
> > > #!/home/jstory/euphoria/bin/exu without warning puts(1, "Content-type:
> > > text/html\n\n")
> > > puts(1, "\n") puts(1, "\n") puts(1, "\n")
> > 
> > Have you modified your htaccess files? Sounds like Apache (or whatever web
> > server you're using) doesn't know what to do with Euphoria source files.
> 
> What, who is htaccess?
> I'm using Opera. Opera understands html files.
> Firefox does the same thing, with a different shade of blue.

You should have a read of this link (on the Wiki): <A
HREF="http://euwiki.ayo.biz/Can_Euphoria_do_CGI%3F">http://euwiki.ayo.biz/Can_Euphoria_do_CGI%3F</A>

Halfway down it explains how to set up your web server to execute the CGI
script.

Gary

new topic     » goto parent     » topic index » view message » categorize

20. Re: Euphoria and CGI

Gary Shingles wrote:
> 
> Jerry Story wrote:
> > 
> > c.k.lester wrote:
> > > 
> > > Jerry Story wrote:
> > > > 
> > > > This is what it does.
> > > > #!/home/jstory/euphoria/bin/exu without warning puts(1, "Content-type:
> > > > text/html\n\n")
> > > > puts(1, "\n") puts(1, "\n") puts(1, "\n")
> > > 
> > > Have you modified your htaccess files? Sounds like Apache (or whatever web
> > > server you're using) doesn't know what to do with Euphoria source files.
> > 
> > What, who is htaccess?
> > I'm using Opera. Opera understands html files.
> > Firefox does the same thing, with a different shade of blue.
> 
> You should have a read of this link (on the Wiki): <A HREF="<a
> href="http://euwiki.ayo.biz/Can_Euphoria_do_CGI%3F">http://euwiki.ayo.biz/Can_Euphoria_do_CGI%3F</a>"><a
> href="http://euwiki.ayo.biz/Can_Euphoria_do_CGI%3F">http://euwiki.ayo.biz/Can_Euphoria_do_CGI%3F</a></A>
> 
> Halfway down it explains how to set up your web server to execute the CGI
> script.
> 
> Gary

The above mentioned link didn't work for me, maybe this version 
of the link will:

http://euwiki.ayo.biz/Can_Euphoria_do_CGI%3F

Dan Moyer

new topic     » goto parent     » topic index » view message » categorize

21. Re: Euphoria and CGI

I'm trying to run the following code on my computer.
(If I can't get it happening on my computer, then I probably
can't get it happening on my ISP's computer.)

#!/home/jstory/euphoria/bin/exu
without warning
 puts(1, "Content-type: text/html\n\n")
 puts(1, "<html><head><title>Quackery Game</title></head>\n")
 puts(1, "<body bgcolor=\"#FFFFFF\">\n")
 puts(1, "</body></html>\n")


What next?

I'm too stupid to understand the euwiki article about CGI_Apache.
http://euwiki.ayo.biz/CGI_Apache

new topic     » goto parent     » topic index » view message » categorize

22. Re: Euphoria and CGI

Jerry Story wrote:
> 
> What next?

Jerry, try my docs at http://cklester.com/euphoria/?page=apache.

Let me know if you have any questions.

new topic     » goto parent     » topic index » view message » categorize

23. Re: Euphoria and CGI

c.k.lester wrote:
> 
> Jerry Story wrote:
> > 
> > What next?
> 
> Jerry, try my docs at <a
> href="http://cklester.com/euphoria/?page=apache">http://cklester.com/euphoria/?page=apache</a>.
> 
> Let me know if you have any questions.

What is Apache? (I looked this up on Google but I don't understand anything.)

How can I know whether I have Apache installed?

What does Apache have to do with running a html file on firefox or opera?

new topic     » goto parent     » topic index » view message » categorize

24. Re: Euphoria and CGI

Jerry Story wrote:

> What is Apache? (I looked this up on Google but I don't understand anything.)

Apache is the program on your computer that serves web pages.

> How can I know whether I have Apache installed?

You will have installed it. Go download it and install it to your computer,
then read up on it. Time for an education if you want to go further.

> What does Apache have to do with running a html file on firefox or opera?

You can view an HTML file without Apache, but you need Apache when
you want dynamic serving of web pages. That is, they are not "static" HTML
text files, but actually programs that need an interpreter.

For instance, http://www.cklester.com/euphoria/bbcmf/ is being generated with
a FreeBSD Euphoria interpreter and served by Apache on FreeBSD 4.x.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu