lukekelly Posted June 22, 2009 Share Posted June 22, 2009 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 More sharing options...
lukekelly Posted June 22, 2009 Author Share Posted June 22, 2009 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.