Riparian Posted May 13, 2010 Share Posted May 13, 2010 Can someone tell me how to use header(location: to open popup widow as the Target) I am trying to use use javascript that I use in href header("Location: "contact_script_upload.php target='popup' 'msgopen('contact_script_upload.php','popup', 650, 350); return false;'"); does not work. any help is greatly appreciated Link to comment https://forums.phpfreaks.com/topic/201574-help-with-location-redirect/ Share on other sites More sharing options...
kenrbnsn Posted May 13, 2010 Share Posted May 13, 2010 You can not use the header function to open up a pop-up window. Ken Link to comment https://forums.phpfreaks.com/topic/201574-help-with-location-redirect/#findComment-1057485 Share on other sites More sharing options...
Jiblix Posted May 13, 2010 Share Posted May 13, 2010 You need to use Javascript. Not a PHP Header(); tag <HEAD> <SCRIPT LANGUAGE="JavaScript"> function popUp(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=500,left = 433,top = 134');"); } </script> </HEAD> <BODY onLoad="javascript:popUp('test.php')"> Hope that helps. Link to comment https://forums.phpfreaks.com/topic/201574-help-with-location-redirect/#findComment-1057488 Share on other sites More sharing options...
Riparian Posted May 13, 2010 Author Share Posted May 13, 2010 Thank you for the help. I will have to approach it in a different way. Cheers Link to comment https://forums.phpfreaks.com/topic/201574-help-with-location-redirect/#findComment-1057501 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.