Jump to content

php and pop ups


lukekelly

Recommended Posts

Hi All,

 

What do you all find best/easiest for inserting javascript/dhtml popup scripts for links in php? Ive done it previously into some pretty simple code but the lines where my links are (for database editing) are on echo's...

 

echo "<td><a href=\"update.php?id=$id\">Update</a> - <a href=\"delete.php?id=$id\">Delete</a></td>";

 

What code would you use?  :-\

Link to comment
https://forums.phpfreaks.com/topic/163232-php-and-pop-ups/
Share on other sites

Anyone ???

"javascript:popUp('update.php?id=$id',700,500,1);"

Doesn't work.

 

Echoing the script

 

echo "<script language=\"javascript\">";
echo "    var win = null;";
echo "    LeftPosition = (screen.width) ? (screen.width-500)/2 : 0;";
echo "    TopPosition = (screen.height) ? (screen.height-640)/2 : 0;";
echo "    settings = 'height=640,width=500,top='+TopPosition+',left='+LeftPosition+',scrollbars=no,resizable=yes,status=no';";
echo "    win = window.open('" . $dest . "','network',settings);";
echo "    window.location = \'update.php?id=$id\';";
echo "</script>";

 

Doesn't work either for what i want.

 

I just need a simple solution for this! TIA

 

Link to comment
https://forums.phpfreaks.com/topic/163232-php-and-pop-ups/#findComment-861254
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.