part of a larger function, echo. function doOpen(url) { var popURL = "about:blank" var popID = "'ad_'" + Math.floor(89999999*Math.random()+10000000); var pxLeft = 0; var pxTop = 0; pxLeft = (GetWindowLeft() + (GetWindowWidth() / 2) - (PopWidth / 2)); pxTop = (GetWindowTop() + (GetWindowHeight() / 2) - (PopHeight / 2)); if ( puShown == true ) { return true; } Code (markup): Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /filepath.php on line 61
function doOpen(url){var popURL = "about:blank";var popID = "'ad_'" + Math.floor(89999999*Math.random()+10000000);var pxLeft = 0;var pxTop = 0;pxLeft = (GetWindowLeft() + (GetWindowWidth() / 2) - (PopWidth / 2));pxTop = (GetWindowTop() + (GetWindowHeight() / 2) - (PopHeight / 2));if ( puShown == true ){return true; PHP:
If you didn't catch it, echipvina was trying to point out that you forgot a semicolon after: var popURL = "about:blank" Code (markup):
If your saying that it should read like this function doOpen(url) { var popURL = "about:blank"; var popID = "'ad_'" + Math.floor(89999999*Math.random()+10000000); var pxLeft = 0; var pxTop = 0; pxLeft = (GetWindowLeft() + (GetWindowWidth() / 2) - (PopWidth / 2)); pxTop = (GetWindowTop() + (GetWindowHeight() / 2) - (PopHeight / 2)); if ( puShown == true ) { return true; } Code (markup): i had tried that already. brings up same error. same line.
The code you write is javascript. if you put that between <?php and ?> it will not work. You will need to put the javascript between the tags <script language="javascript"> and </script> and if you want to add javascript between <?php and ?> you will need to echo it.
Yes, possible. I tried changing <script> to <script type=\"text/javascript\"> (it is already within a <script> </script> inside the larger php file that encompasses it but also tried changing script to the line above is what I am trying to say) It is part of a *.php file that I am wanting to upload to wordpress which is why its included also in larger <?php
ANd its echoed before a previous function. function StartsLikeThis(){ echo " <script type=\"text/javascript\"> Code (markup):
Please read the comments before posting. I've just read three of your comments in the last minute that were all deemed useless because your responses were wrong or repeats.