Pop window in php


I have struggling for hours to find a code purely in php for a popup window. The code is quite simple but a bit tricky. it requires java script to be integrated in the php code.  Here it is

  1. value1=urlencode('some value');

  2. echo "<a href=\"javascript :window.open('page.php?param1=$value1','name1','height=320,width=240');\">pop-up</a>";

For example I need to add a code in my php script to open a pop up window, here it is;

echo "<a href=\"javascript:window.open('editspares.php?id=$spareid&refno=$reference_id','Edit Spare Parts','height=50,width=650');\">Edit</a>";


One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s