Re: spot the mistake

From: Date: Sun, 12 Nov 2006 18:01:57 +0000
Subject: Re: spot the mistake
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-244524@lists.php.net to get a copy of this message
Ross wrote: > echo ('<a href="#" > > onclick="window.open(\'news/old_news_list.php?month=$j&amp;year='.$i.'\',\'\',\'width=700,height=500\'); > return false \" >$thisMonth</a>'); > t my first guess is that you've back-slashed something you shouldn't have - try breaking it down (and/or looking at the html source) ... $url = "news/old_news_list.php?month=$j&amp;year=$i"; $js = "window.open('%s','','width=700,height=500'); return false;"; $lnk = '<a href="#" onclick=".$js." >%s</a> printf($lnk, $url, $thisMonth); > > I am trying to get this to open in a popup however it doess not open and I > cannot work out why. Must be a syntax arror as the page displays ok. > > > Ross >

« previous php.general (#244524) next »