Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to output half a page at a time?

Posted on 1998-11-02
13
Medium Priority
?
186 Views
Last Modified: 2013-12-25
Hello,

I have a situation where I want to output html to the client browser for display ("Please wait...") while I am validating the credit card data...this can take up to 60 secs...when the credit card is validated, then I want to display "Your card is validated"

What is the best way to do this?

Keith Kwiatek
0
Comment
Question by:edwardk091997
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
  • +2
13 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 1829393
See answer in JavaScript forum
0
 
LVL 1

Expert Comment

by:rajgn
ID: 1829394
What're the tools,scripts you're using?
0
 
LVL 1

Expert Comment

by:rajgn
ID: 1829395
What're the tools,scripts you're using?
0
Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

 
LVL 8

Accepted Solution

by:
MaDdUCK earned 200 total points
ID: 1829396
with cgi, you would name the cgi file nph-cgi.exe or just nph-cgi (nph - non-parsed header). then, you need to output all headers with this cgi:

HTTP/1.0 200 OK
Content-type: text/html

then your text.

after the please wait, flush stdout and it should display. finally, simply continue writing to stdout and flushing it to display records.
0
 
LVL 3

Expert Comment

by:a111a111a111
ID: 1829397
Try the simple way:
No java No javascript just the simple way!
<HTML>
<HEAD>
<!-- 60 = 60 seconds pause time before loading the second page-->
  <META HTTP-EQUIV="REFRESH" CONTENT="60; URL=http://www.my home page/my second page.com">
  <TITLE>pause for 60 seconds and load sound! </TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff">

<P><CENTER>&nbsp;</CENTER></P>

<P><CENTER>&nbsp;</CENTER></P>

<P><CENTER>&nbsp;</CENTER></P>

<P><CENTER><FONT SIZE="+2">Welcome To</FONT></CENTER></P>

<P><CENTER><I><FONT SIZE="+3">my site....</FONT></I></CENTER></P>

<P><CENTER><FONT SIZE="+2">Please stand By - Page is Loading!</FONT></CENTER></P>

<P><CENTER><FONT SIZE="+2"></FONT>&nbsp;</CENTER></P>

<P><CENTER><I><FONT SIZE="+2">Our Pages are best viewed at 800
x 600</FONT></I></CENTER></P>

<P><CENTER><I><FONT SIZE="+2">Using <A HREF="http://www.netscape.com/computing/download/index.html?cp=hom10tdow">Netscape</A>!</FONT></I></CENTER></P>

<P><CENTER><I><FONT SIZE="+2">Some pages contain audio!</FONT></I></CENTER></P>

<P><EMBED SRC="midi/my audio.mid" AUTOSTART="true" HIDDEN="TRUE"
VOLUME="75" </P WIDTH="100" HEIGHT="100" ALIGN="BOTTOM">

</BODY>
</HTML>

Try it and see if it works for you.

I helped to build the site http://www.hili.com/~stanne  that using this method.

You can add music, Commercial wav files and so...

You can place cascade of META HTTP-EQUIV="REFRESH" CONTENT="60;... why not after 15 30 45 seconds to let your user know progress time ...

Again No JAVA No Javascript...

any more help email to shayplace@hotmail.com

Good luck.
0
 

Author Comment

by:edwardk091997
ID: 1829398
MaDdUCK,

I had been doing what you suggest, but it seems to only work some of the time....

Sometimes it will print the first half of the page, and then, a few moments later, it will print the second half of the page (this is what I want)....BUT, at other times, the browser will wait till it has the whole page before it displays it out....

Any other ideas/suggestions?

Thanks,
Keith.

What could be going on here?
0
 
LVL 8

Expert Comment

by:MaDdUCK
ID: 1829399
give me your code...i need to see it to tell you what's up.
0
 

Author Comment

by:edwardk091997
ID: 1829400
I have been testing with a simple perl script...sometimes it works, sometimes it doesn't...

#!/usr/bin/perl
require "flush.pl;

print"Content-Type: text/html\n\n";
print"<HTML> Start the output with this .......<P>";
&flush(STDOUT);

for ($i=0;$i<5;$i++)
{sleep(1);}

print"<P>...finish the page with this!<P></html>";


0
 
LVL 8

Expert Comment

by:MaDdUCK
ID: 1829401
can you give me till the weekend. I have spotted your error and I would like to answer this question, but I am very busy right now. basically you are not outputting all headers required for nph scripts and you assume the server will do it for you. sometimes this will work, but most of the time it will not. I will get to this on the weekend, promise!

if you really urgently need this soon then I guess I could be persuaded, but I would really prefer to wait a little.
0
 

Author Comment

by:edwardk091997
ID: 1829402
It is important to me....but I can wait...Thank you so much for your help!

Keith
0
 
LVL 8

Expert Comment

by:MaDdUCK
ID: 1829403
Okay, to quickly help you: you should do the following:

//-----------------------//
#!/usr/bin/perl
require "flush.pl;

my ok_response = "200 OK";
print $ENV("SERVER_PROTOCOL")." ".ok_response\r\n";
print "Expires: 0\r\n";
print "Content-Type: text/html\r\n\r\n";

// the rest here

//-----------------------//

call your script "nph-test.pl" and see if this works (the nph- is important!)

later,
MaD dUCK


0
 
LVL 8

Expert Comment

by:MaDdUCK
ID: 1829404
my Perl may be a bit rusty...$ENV(var) should retrieve the contents of the environment variable #var#.
0
 

Author Comment

by:edwardk091997
ID: 1829405
Thanks for all your help!
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question