Re: A two flavored post

From: Date: Fri, 05 Oct 2007 18:02:24 +0000
Subject: Re: A two flavored post
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-262831@lists.php.net to get a copy of this message
On Fri, 2007-10-05 at 19:19 +0200, Aleksandar Vojnovic wrote: > This might be a way to do it: > > *Example 1* > <script> > function appendMeBaby(aVar){ > self.location.href = 'img.php?s=' + aVar + > '&someOtherVar=itIsMeTheValue'; > } > </script> > <a href="javascript:appendMeBaby(<?php echo($value);?>);">Click > here</a> > > *Example 2* > <script> > function appendMeBaby(aVar, bVar){ > self.location.href = 'img.php?s=' + aVar + '&someOtherVar=' + bVar; > } > </script> > <a href="javascript:appendMeBaby(<?php echo($value);?>, > 'itIsMeTheOtherValue');">Click here</a> I don't believe that is standards-compliant use of the href attribute. Also it doesn't degrade gracefully for people who have JavaScript disabled. Cheers, Rob. -- ........................................................... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ...........................................................

« previous php.general (#262831) next »