open javascript window inside php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
neojo
Forum Newbie
Posts: 4
Joined: Fri Aug 12, 2005 4:14 pm

open javascript window inside php

Post by neojo »

I am having an absolute nightmare figuring this out and i'm sure it shouldn't be that difficult (however i am new to php). Have been searching google for the past few hours and no luck...

I can't get my " " and ' ' right, can anyone help?? here's my code:

Code: Select all

<script language="JavaScript" type="text/JavaScript">
<!--
function openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
return false;
}
//-->
</script>

<? 
echo '<a class="top" href="javascript:;" onclick="openBrWindow("neojo.co.uk/cgi-bin/'.$folder.'/guestbook/guestbook.cgi?mode=view","","scrollbars=yes resizable=yes width=550 height=700")">Click here</a>';
?>

feyd | :?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Code: Select all

<?
echo '<a class="top" href="javascript:;" onclick="openBrWindow(\'neojo.co.uk/cgi-bin/'.$folder.'/guestbook/guestbook.cgi?mode=view\',\'\',\'scrollbars=yes resizable=yes width=550 height=700\')">Click here</a>';
?>
neojo
Forum Newbie
Posts: 4
Joined: Fri Aug 12, 2005 4:14 pm

Post by neojo »

thanks a million, works a treat.
Post Reply