You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Pierre-Yves BONNETAIN <bo...@acm.org> on 2000/07/03 12:42:42 UTC

Script that stays on the same page

   Hello,

   For my server, I need to write some script that will be 'regularly'
triggered (GET or POST), but that will NOT send the user to another page. The
user must stay on the same page he is, without ANY html being exchanged as
a result of the script.
   This will be used to change parameters on the user's session, but since 
those params will not affect the page the user is currently looking at, there
is no need to send HTML back.
   So, 1/ can it be done ? 2/ How ?
   TIA,
-- 
-+-+ Pierre-Yves BONNETAIN (aka Pyb)
     Consultant Internet/Sécurité --- B & A Consultants
     Tel : 0 563.277.241 - Fax : 0 563.277.245



RE: Script that stays on the same page

Posted by Howard Jones <ho...@vossnet.co.uk>.
IIRC, NPH scripts are a source of bad karma with HTTP/1.1 because they stop
Apache dealing effectively with proxies, amongst other things.

Best Regards,

Howie.

-----Original Message-----
From: Dana Powers [mailto:dana420@quicknet.net]
Sent: 05 July 2000 18:58
To: Pierre-Yves BONNETAIN
Cc: modperl@apache.org
Subject: Re: Script that stays on the same page


I would try using a Non-Parsed-Header (NPH) script and return something like
this:

	print << "END";
HTTP/1.0 204 No Response

END

Dana

On Mon, 03 Jul 2000, Pierre-Yves BONNETAIN wrote:
> Hello,
>
>    For my server, I need to write some script that will be 'regularly'
> triggered (GET or POST), but that will NOT send the user to another page.
The
> user must stay on the same page he is, without ANY html being exchanged as
> a result of the script.
>    This will be used to change parameters on the user's session, but since
> those params will not affect the page the user is currently looking at,
there
> is no need to send HTML back.
>    So, 1/ can it be done ? 2/ How ?
>    TIA,
> --
> -+-+ Pierre-Yves BONNETAIN (aka Pyb)
>      Consultant Internet/Sécurité --- B & A Consultants
>      Tel : 0 563.277.241 - Fax : 0 563.277.245



Re: Script that stays on the same page

Posted by Dana Powers <da...@quicknet.net>.
I would try using a Non-Parsed-Header (NPH) script and return something like
this:

	print << "END";
HTTP/1.0 204 No Response

END

Dana

On Mon, 03 Jul 2000, Pierre-Yves BONNETAIN wrote:
> Hello,
> 
>    For my server, I need to write some script that will be 'regularly'
> triggered (GET or POST), but that will NOT send the user to another page. The
> user must stay on the same page he is, without ANY html being exchanged as
> a result of the script.
>    This will be used to change parameters on the user's session, but since 
> those params will not affect the page the user is currently looking at, there
> is no need to send HTML back.
>    So, 1/ can it be done ? 2/ How ?
>    TIA,
> -- 
> -+-+ Pierre-Yves BONNETAIN (aka Pyb)
>      Consultant Internet/S�curit� --- B & A Consultants
>      Tel : 0 563.277.241 - Fax : 0 563.277.245

Re: Script that stays on the same page

Posted by jeff <je...@planetoid.net>.
what about returning the http no response code 204. as in

print $query->header('text/html','204 No response');

will trillich wrote:

> Pierre-Yves BONNETAIN wrote:
> >
> >    Hello,
> >
> >    For my server, I need to write some script that will be 'regularly'
> > triggered (GET or POST), but that will NOT send the user to another page. The
> > user must stay on the same page he is, without ANY html being exchanged as
> > a result of the script.
> >    This will be used to change parameters on the user's session, but since
> > those params will not affect the page the user is currently looking at, there
> > is no need to send HTML back.
> >    So, 1/ can it be done ? 2/ How ?
>
> www.macconnection.com or www.pcconnection.com do a nice job of this.
> see any of their 'smart selectors'... every time you select a menu
> option, the number of items 'found' by the /server/ scripts, based on
> the users' new parameters, pop up into a text box. very slick.
>
> -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
> Their is five errers in this sentance.




--
Jeff Saenz
jeff@planetoid.net



Re: Script that stays on the same page

Posted by will trillich <wi...@pinncomp.net>.
Pierre-Yves BONNETAIN wrote:
> 
>    Hello,
> 
>    For my server, I need to write some script that will be 'regularly'
> triggered (GET or POST), but that will NOT send the user to another page. The
> user must stay on the same page he is, without ANY html being exchanged as
> a result of the script.
>    This will be used to change parameters on the user's session, but since
> those params will not affect the page the user is currently looking at, there
> is no need to send HTML back.
>    So, 1/ can it be done ? 2/ How ?

www.macconnection.com or www.pcconnection.com do a nice job of this.
see any of their 'smart selectors'... every time you select a menu
option, the number of items 'found' by the /server/ scripts, based on
the users' new parameters, pop up into a text box. very slick.

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Their is five errers in this sentance.

Re: Script that stays on the same page

Posted by Alan Sparks <as...@cpd.harris.com>.
It's generally not a good idea to follow up a user action with a page
that doesn't change... The lack of feedback makes people very nervous.

Notwithstanding, you can accomplish this by sending back a Status: of
204 (No Change) and a content-type: of text/html -- with no entity
body.  The browser will leave the current page displayed, with no
indication of a reloaded anything.
-Alan

Pierre-Yves BONNETAIN wrote:
> 
>    Hello,
> 
>    For my server, I need to write some script that will be 'regularly'
> triggered (GET or POST), but that will NOT send the user to another page. The
> user must stay on the same page he is, without ANY html being exchanged as
> a result of the script.
>    This will be used to change parameters on the user's session, but since
> those params will not affect the page the user is currently looking at, there
> is no need to send HTML back.
>    So, 1/ can it be done ? 2/ How ?
>    TIA,
> --
> -+-+ Pierre-Yves BONNETAIN (aka Pyb)
>      Consultant Internet/Sécurité --- B & A Consultants
>      Tel : 0 563.277.241 - Fax : 0 563.277.245