|
|||||
|
|
#1 |
|
|
execute. While it's executing, I want a temporary page to be loaded, with perhaps an advert, and when the search actually completes, the search results are displayed. It's like on orbitz or hotwire, when you search and they show you some messages while it's searching. Any clues on how I'd do that? Thanks, Z |
|
|
#2 |
|
|
If a search takes long enough for me to actually pay attention to the advert.... the little cross at the right top corner of the browserwindow would be c****ed on... instantly. Michel "OneSolution" <onesolution@sbcglobal.net> wrote in message news:tkyvc.2489$kp2.2141@newssvr24.news.prodigy.co m... > When my users type in a search parameter on my website, I want the search to > execute. While it's executing, I want a temporary page to be loaded, with > perhaps an advert, and when the search actually completes, the search > results are displayed. > > It's like on orbitz or hotwire, when you search and they show you some > messages while it's searching. > > Any clues on how I'd do that? > > Thanks, > Z > > |
|
|
#3 |
|
|
"michel" <no@spam.please> wrote in message news:c9mf6l$vui$1@news.cistron.nl... > is that of any use at all? > If a search takes long enough for me to actually pay attention to the > advert.... the little cross at the right top corner of the browserwindow > would be c****ed on... instantly. > > Michel > > "OneSolution" <onesolution@sbcglobal.net> wrote in message > news:tkyvc.2489$kp2.2141@newssvr24.news.prodigy.co m... > > When my users type in a search parameter on my website, I want the search > to > > execute. While it's executing, I want a temporary page to be loaded, with > > perhaps an advert, and when the search actually completes, the search > > results are displayed. > > > > It's like on orbitz or hotwire, when you search and they show you some > > messages while it's searching. > > > > Any clues on how I'd do that? > > > > Thanks, > > Z > > > > > > |
|
|
#4 |
|
|
You can print the advert with
<?php $advert="somec****ableadvert-html"; print $advert;flush(); //now search //end search print $results ?> flush would send it to the browser and the script continues. After completion, you can show the results. The advert stays in this case, even when the search completed, but the again, it might convert into sales at any point, so no worries there, I suppose? Greetz, Mich "OneSolution" <onesolution@sbcglobal.net> wrote in message news:Mrzvc.2495$FC2.1380@newssvr24.news.prodigy.co m... > Ok, that's great to know. But how do I do it then? > > > "michel" <no@spam.please> wrote in message > news:c9mf6l$vui$1@news.cistron.nl... > > is that of any use at all? > > If a search takes long enough for me to actually pay attention to the > > advert.... the little cross at the right top corner of the browserwindow > > would be c****ed on... instantly. > > > > Michel > > > > "OneSolution" <onesolution@sbcglobal.net> wrote in message > > news:tkyvc.2489$kp2.2141@newssvr24.news.prodigy.co m... > > > When my users type in a search parameter on my website, I want the > search > > to > > > execute. While it's executing, I want a temporary page to be loaded, > with > > > perhaps an advert, and when the search actually completes, the search > > > results are displayed. > > > > > > It's like on orbitz or hotwire, when you search and they show you some > > > messages while it's searching. > > > > > > Any clues on how I'd do that? > > > > > > Thanks, > > > Z > > > > > > > > > > > > |
|
|
#5 |
|
|
Thanks. So the flush() will make the advert HTML display, and then I
suppose the browser icon (on the top right) will keep spinning. Then the rest of the code will then execute, and then would I be able to bounce the user onto a next page that will display the results of the search? For example, by using the header() function? Thanks, Z "michel" <no@spam.please> wrote in message news:c9moju$ae3$1@news.cistron.nl... > You can print the advert with > <?php > > $advert="somec****ableadvert-html"; > print $advert;flush(); > > //now search > > //end search > > print $results > > ?> > > flush would send it to the browser and the script continues. > After completion, you can show the results. > The advert stays in this case, even when the search completed, but the > again, it might convert into sales at any point, so no worries there, I > suppose? > > Greetz, > > Mich > > > > > "OneSolution" <onesolution@sbcglobal.net> wrote in message > news:Mrzvc.2495$FC2.1380@newssvr24.news.prodigy.co m... > > Ok, that's great to know. But how do I do it then? > > > > > > "michel" <no@spam.please> wrote in message > > news:c9mf6l$vui$1@news.cistron.nl... > > > is that of any use at all? > > > If a search takes long enough for me to actually pay attention to the > > > advert.... the little cross at the right top corner of the browserwindow > > > would be c****ed on... instantly. > > > > > > Michel > > > > > > "OneSolution" <onesolution@sbcglobal.net> wrote in message > > > news:tkyvc.2489$kp2.2141@newssvr24.news.prodigy.co m... > > > > When my users type in a search parameter on my website, I want the > > search > > > to > > > > execute. While it's executing, I want a temporary page to be loaded, > > with > > > > perhaps an advert, and when the search actually completes, the search > > > > results are displayed. > > > > > > > > It's like on orbitz or hotwire, when you search and they show you some > > > > messages while it's searching. > > > > > > > > Any clues on how I'd do that? > > > > > > > > Thanks, > > > > Z > > > > > > > > > > > > > > > > > > > > |
|
|
#6 |
|
|
Regarding this well-known quote, often attributed to OneSolution's famous
"Thu, 03 Jun 2004 19:01:25 GMT" speech: > Thanks. So the flush() will make the advert HTML display, and then I > suppose the browser icon (on the top right) will keep spinning. Then the > rest of the code will then execute, and then would I be able to bounce the > user onto a next page that will display the results of the search? For > example, by using the header() function? > > Thanks, > Z > > > > "michel" <no@spam.please> wrote in message > news:c9moju$ae3$1@news.cistron.nl... >> You can print the advert with >> <?php >> >> $advert="somec****ableadvert-html"; >> print $advert;flush(); >> >> //now search >> >> //end search >> >> print $results >> >> ?> >> >> flush would send it to the browser and the script continues. >> After completion, you can show the results. >> The advert stays in this case, even when the search completed, but the >> again, it might convert into sales at any point, so no worries there, I >> suppose? >> >> Greetz, >> >> Mich >> >> >> >> >> "OneSolution" <onesolution@sbcglobal.net> wrote in message >> news:Mrzvc.2495$FC2.1380@newssvr24.news.prodigy.co m... >>> Ok, that's great to know. But how do I do it then? >>> >>> >>> "michel" <no@spam.please> wrote in message >>> news:c9mf6l$vui$1@news.cistron.nl... >>> > is that of any use at all? >>> > If a search takes long enough for me to actually pay attention to the >>> > advert.... the little cross at the right top corner of the > browserwindow >>> > would be c****ed on... instantly. >>> > >>> > Michel >>> > >>> > "OneSolution" <onesolution@sbcglobal.net> wrote in message >>> > news:tkyvc.2489$kp2.2141@newssvr24.news.prodigy.co m... >>> > > When my users type in a search parameter on my website, I want the >>> search >>> > to >>> > > execute. While it's executing, I want a temporary page to be > loaded, >>> with >>> > > perhaps an advert, and when the search actually completes, the > search >>> > > results are displayed. >>> > > >>> > > It's like on orbitz or hotwire, when you search and they show you > some >>> > > messages while it's searching. >>> > > >>> > > Any clues on how I'd do that? >>> > > >>> > > Thanks, >>> > > Z >>> > > >>> > > >>> > >>> > >>> >>> >> >> Nope. You can't header() after you've output anything to the browser. I'd recommend a multi-purpose page running as one PHP file: if (the search is done) { display the results... } else { header("Refresh: 2"); // wait 2 seconds and reload display the ad... } A few include()s later, and I imagine you could even make it look nice and work well. -- -- Rudy Fleminger -- sp@mmers.and.evil.ones.will.bow-down-to.us (put "Hey!" in the Subject line for priority processing!) -- http://www.pixelsaredead.com |
|
|
#7 |
|
|
Bounce to next page is not possible using header, since the header is sent
when displaying the advert. however, you can still shoot the browser a javascript that does the redirecting for you. And a link for the users that have javascript unavailable to their browsers. Greetz, Michel "OneSolution" <onesolution@sbcglobal.net> wrote in message news:9AKvc.2557$He5.2541@newssvr24.news.prodigy.co m... > Thanks. So the flush() will make the advert HTML display, and then I > suppose the browser icon (on the top right) will keep spinning. Then the > rest of the code will then execute, and then would I be able to bounce the > user onto a next page that will display the results of the search? For > example, by using the header() function? > > Thanks, > Z > > > > "michel" <no@spam.please> wrote in message > news:c9moju$ae3$1@news.cistron.nl... > > You can print the advert with > > <?php > > > > $advert="somec****ableadvert-html"; > > print $advert;flush(); > > > > //now search > > > > //end search > > > > print $results > > > > ?> > > > > flush would send it to the browser and the script continues. > > After completion, you can show the results. > > The advert stays in this case, even when the search completed, but the > > again, it might convert into sales at any point, so no worries there, I > > suppose? > > > > Greetz, > > > > Mich > > > > > > > > > > "OneSolution" <onesolution@sbcglobal.net> wrote in message > > news:Mrzvc.2495$FC2.1380@newssvr24.news.prodigy.co m... > > > Ok, that's great to know. But how do I do it then? > > > > > > > > > "michel" <no@spam.please> wrote in message > > > news:c9mf6l$vui$1@news.cistron.nl... > > > > is that of any use at all? > > > > If a search takes long enough for me to actually pay attention to the > > > > advert.... the little cross at the right top corner of the > browserwindow > > > > would be c****ed on... instantly. > > > > > > > > Michel > > > > > > > > "OneSolution" <onesolution@sbcglobal.net> wrote in message > > > > news:tkyvc.2489$kp2.2141@newssvr24.news.prodigy.co m... > > > > > When my users type in a search parameter on my website, I want the > > > search > > > > to > > > > > execute. While it's executing, I want a temporary page to be > loaded, > > > with > > > > > perhaps an advert, and when the search actually completes, the > search > > > > > results are displayed. > > > > > > > > > > It's like on orbitz or hotwire, when you search and they show you > some > > > > > messages while it's searching. > > > > > > > > > > Any clues on how I'd do that? > > > > > > > > > > Thanks, > > > > > Z > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
|
|
#8 |
|
|
> if (the search is done) { > display the results... > } else { > header("Refresh: 2"); // wait 2 seconds and reload > display the ad... > } > Not a nice solution. it will run multiple instances of the same script .. this will result in problems, definitely. Michel |
|
|
#9 |
|
|
Regarding this well-known quote, often attributed to michel's famous "Fri,
4 Jun 2004 10:40:49 +0200" speech: >> if (the search is done) { >> display the results... >> } else { >> header("Refresh: 2"); // wait 2 seconds and reload >> display the ad... >> } >> > > Not a nice solution. it will run multiple instances of the same script .. > this will result in problems, definitely. > > Michel I don't follow you. If the actual searching mechanism isn't in this script, just a simple "check if it's done" method, how would this run multiple instances, especially if the Refresh timeout is 2 seconds? -- -- Rudy Fleminger -- sp@mmers.and.evil.ones.will.bow-down-to.us (put "Hey!" in the Subject line for priority processing!) -- http://www.pixelsaredead.com |
|
|
#10 |
|
|
"OneSolution" <onesolution@sbcglobal.net> wrote in message
news:9AKvc.2557$He5.2541@newssvr24.news.prodigy.co m... > Thanks. So the flush() will make the advert HTML display, and then I > suppose the browser icon (on the top right) will keep spinning. Then the > rest of the code will then execute, and then would I be able to bounce the > user onto a next page that will display the results of the search? For > example, by using the header() function? No, the same script will display the advert HTML, perform the search, and display the result: <? ShowAdvertisement(); // do search here HideAdvertisement(); // print the result ?> The Show/HideAdvertisement functions could look like this: <? function ShowAdvertisement() { echo '<div id="billboard">'; readfile("advert.html"); echo '</div>'; // flush IE's internal buffer with useless data for($i = 0; $i < 200; $i) { echo '<!-- NO COMMENT -->'; } flush(); } function HideAdvertisement() { echo '<style> #billboard { display: none; } </style>'; } ?> |