CoreyR Posted May 3, 2007 Share Posted May 3, 2007 Anyone know why this wouldn't work? I've tried several different ways and have read several posts. Print "<div class='sponsors_cell'><a href='http://www.sanjoseteam.com/info-request/new-listings-email.html' onclick='window.open('http://www.sanjoseteam.com/info-request/new-listings-email.html', 'contact', 'status=no,resizable=no,width=550,height=560'); return false'><img src='http://www.sanjoseteam.com/images/santa_clara_listings' alt='Blossom Valley Real Estate' width='125' height='125' vspace='4' border='0' /></a><br />"; Quote Link to comment Share on other sites More sharing options...
taith Posted May 3, 2007 Share Posted May 3, 2007 that would be a javascript issue... not a php one... but this should work... simple php function to do just that :-) <? function popup($text, $link, $name="", $height="300", $width="300", $resizable="0", $status="0", $class=""){ return '<a href="javascript:void(0);" onclick=\'javascript: window.open("'.$link.'", "'.$name.'", "status='.$status.', height='.$height.', width='.$width.', resizable='.$resizable.'")\' class='.$class.'>'.$text.'</a>'; } ?> Quote Link to comment Share on other sites More sharing options...
obsidian Posted May 3, 2007 Share Posted May 3, 2007 Anyone know why this wouldn't work? I've tried several different ways and have read several posts. Print "<div class='sponsors_cell'><a href='http://www.sanjoseteam.com/info-request/new-listings-email.html' onclick='window.open('http://www.sanjoseteam.com/info-request/new-listings-email.html', 'contact', 'status=no,resizable=no,width=550,height=560'); return false'><img src='http://www.sanjoseteam.com/images/santa_clara_listings' alt='Blossom Valley Real Estate' width='125' height='125' vspace='4' border='0' /></a><br />"; It's because your quotes are canceling out when the HTML gets to the browser. You need to change your quotes around a tad. Try this instead: <?php print "<div class='sponsors_cell'><a href='http://www.sanjoseteam.com/info-request/new-listings-email.html' onclick=\"window.open('http://www.sanjoseteam.com/info-request/new-listings-email.html', 'contact', 'status=no,resizable=no,width=550,height=560'); return false\"><img src='http://www.sanjoseteam.com/images/santa_clara_listings' alt='Blossom Valley Real Estate' width='125' height='125' vspace='4' border='0' /></a><br />"; ?> Quote Link to comment Share on other sites More sharing options...
CoreyR Posted May 3, 2007 Author Share Posted May 3, 2007 Damn, that worked great. Thank you!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.