homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

resizable browser window code snippet within php doesn't work

 12:02 am on Nov 17, 2007 (gmt 0)

Hello all,

I am a php/mysql beginner.

My design: a box with one FAQ gives the option to read "more", upon clicking "more" a new resized (smaller) browser window opens to display all FAQ.
I found some code that does the resizing. It works well outside the php code, yet upon integrating it into the php code it doesn't work. "more" displays fine, yet nothing happen after clicking it. Is it maybe the ";" within the resizing code snippet? Your help is so very much appreciated.

$query = "SELECT question,answer FROM faq WHERE faqid=1";

$result = mysql_query($query) or die('Sorry, could not get faq at this time');
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
$question= $row['question'];

echo"<p class=\"head\">Q.:$question</p>\n";
echo"<p class=\"last\"><span>A.:</span> $answer<br>
<a href=\"content/faq.php\" onClick=\"popup = window.open('content/faq.php', 'PopupPage', 'height=200,width=500,scrollbars=yes,resizeable=no'); return false\" target=\"_blank\">more >></a></p>\n";


Thank you,



 5:56 pm on Nov 17, 2007 (gmt 0)

Dont you just need -
onClick=\"window.open('content/faq.php', 'PopupPage', 'height=200,width=500,scrollbars=yes,resizeable=no'); return false\"
Remove the popup = bit.


 9:16 pm on Nov 19, 2007 (gmt 0)

That was it! Thank you so much, PHP_Chimp!


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved