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 Quote Link to comment 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? Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
efficacious Posted August 29, 2008 Author Share Posted August 29, 2008 anyone? Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
efficacious Posted August 29, 2008 Author Share Posted August 29, 2008 thanks ne ways........ eff Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.