You are here: Re: [PHP] javascript in php page to use window.open() « PHP « IT news, forums, messages
Re: [PHP] javascript in php page to use window.open()

Posted by "Rodolfo Andrade" on 01/12/06 12:47

Hi Olga,

Your Javascript window.open() is missing one argument, the name of the
pop-up window:

window.open(\"add.html\",\"MyWindowName\",\"resizable=no,width=400,height=20
0\");

Best Regards,
Rodolfo Andrade

----- Original Message -----
From: Olga Urban
To: php-general@lists.php.net
Sent: Thursday, January 12, 2006 2:51 AM
Subject: [PHP] javascript in php page to use window.open()


Hi everyone,

I am trying to open a new window after a successful function call (I
don't want to use <a href. and onclick). Here's what I have, but for
some reason, in IE the new window does not open (I have popup blockers
disabled). It opens in Mozilla, but with the wrong size. What am I doing
wrong here?

if (insert($lname, $fname, $course, $date, $media1,
$media2))
{
echo "<script type=\"text/javascript\">\n";
echo "
window.open(\"add.html\",\"resizable=no,width=400,height=200\");";
echo "</script>\n\n";
}
else
echo "Error adding a record.";



Thanks.

Olga

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация