Page 1 of 1

open javascript window inside php

Posted: Fri Aug 12, 2005 4:21 pm
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 | :?

Posted: Fri Aug 12, 2005 4:26 pm
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>';
?>

Posted: Fri Aug 12, 2005 4:38 pm
by neojo
thanks a million, works a treat.