Re: Most portable back button in php

From: Date: Thu, 08 Aug 2002 13:54:19 +0000
Subject: Re: Most portable back button in php
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-111650@lists.php.net to get a copy of this message
Thanks, I'll have a go. In answer to the question about the browsers back button; sometimes that may not be visible either because the user has setup the browser that way or because a window has been opened without it. It is accepted, however, that since javascript would be needed to open a window without the browsers back button (if the user configuration had it showing), then a javascript solution would be fine. Basically I'm just trying to be "completely" portable, a tall order I know but easier to attain server side!! Thanks for you help Henry "Justin French" <justin@indent.com.au> wrote in message news:B978AC15.C477%justin@indent.com.au... > You could do something like > > <? > if(!empty($HTTP_REFERRER)) > { > // echo a back link with HTML > } > else > { > echo "<SCRIPT language=\"javascript\">"; > //back link using document write in javascript > echo "</SCRIPT><NOSCRIPT>click your browser's back > button</NOSCRIPT>"; > } > ?> > > So, by default, we use the referrer. > If the referrer isn't set, try to do it with javascript write > if they don't have javascript, the NOSCRIPT tag kicks in and saves the day, > sorta > > > I dunno. The browser has a back button -- why can't they use that? > > > Justin French > > > on 08/08/02 10:16 PM, Henry (henry@teacake.f9.co.uk) wrote: > > > Hi All, > > > > What is the most portable method of generating a back button in a php page. > > > > Is there a way of creating a link to the referrer page etc. > > > > I want to make sure that it will work with all browsers so I am trying to > > avoid javascripts, history etc. etc. > > > > TIA > > > > Henry > > > > >

« previous php.general (#111650) next »