efficacious Posted August 29, 2008 Share Posted August 29, 2008 Hello everyone, I was just wondering how I could make a pop window that uses a div and an iframe rather then an actual new browser window. i've tried this code snippet from W3schools but it gives me an 'invalid argument' error function openday(x) { var p=window.createPopup(); var pbody=p.document.body; pbody.style.backgroundImage="imgs/breaker.png"; pbody.style.backgroundColor="transparent"; pbody.style.border="solid black 1px"; pbody.innerHTML="This is a pop-up! Click outside the pop-up to close."; p.show(150,150,200,50,document.body); } thanks, eff Link to comment https://forums.phpfreaks.com/topic/121874-solved-popup-no-window/ Share on other sites More sharing options...
Bricktop Posted August 29, 2008 Share Posted August 29, 2008 Have you changed the onclick event to read: <button onclick="openday()">Create pop-up!</button> Also, edit: function openday(x) to be: function openday() Not sure what the x is for? Link to comment https://forums.phpfreaks.com/topic/121874-solved-popup-no-window/#findComment-628821 Share on other sites More sharing options...
efficacious Posted August 29, 2008 Author Share Posted August 29, 2008 well its from the function i had setup previously to create a regular browser window.. the x carried over information about the popup window. Link to comment https://forums.phpfreaks.com/topic/121874-solved-popup-no-window/#findComment-628858 Share on other sites More sharing options...
efficacious Posted August 29, 2008 Author Share Posted August 29, 2008 anyone? Link to comment https://forums.phpfreaks.com/topic/121874-solved-popup-no-window/#findComment-629006 Share on other sites More sharing options...
efficacious Posted August 29, 2008 Author Share Posted August 29, 2008 function openday() { document.getElementById('Popper').style.Visibility='visible'; document.getElementById('Popper').style.Display='block'; } tryed using this with an onclick event but it does nothing.. doens't even throw an error Link to comment https://forums.phpfreaks.com/topic/121874-solved-popup-no-window/#findComment-629064 Share on other sites More sharing options...
efficacious Posted August 29, 2008 Author Share Posted August 29, 2008 thanks ne ways........ eff Link to comment https://forums.phpfreaks.com/topic/121874-solved-popup-no-window/#findComment-629153 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.