Jump to content

CSS "Popup Window". How to load content after user have opened "window"?


Zombay

Recommended Posts

Hi! I found this easy script from: http://codesnippets.joyent.com/posts/show/708

 

	Click <a onmouseover='this.style.cursor="pointer" ' onfocus='this.blur();' onclick="document.getElementById('PopUp').style.display = 'block' " ><span style="text-decoration: underline;">here</span></a>
<div id='PopUp' style='display: none; position: absolute; left: 50px; top: 50px; border: solid black 1px; padding: 10px; background-color: rgb(255,255,225); text-align: justify; font-size: 12px; width: 135px;'>
This is a CSS Popup that can be positioned anywhere you want on the page and can contain any test and images you want.
<br />
<div style='text-align: right;'><a onmouseover='this.style.cursor="pointer" ' style='font-size: 12px;' onfocus='this.blur();' onclick="document.getElementById('PopUp').style.display = 'none' " ><span style="text-decoration: underline;">Close</span></a></div>
</div>

 

 

The idea is old; div's display is changed by javasrcipt ´none´ to ´block´...

 

I would like to use this at my site in many cases and I was woundering what would be the best solution to load content in ´PopUp´ -div AFTER user have pressed ´Click´ and opened "Popup Window"? With iframe maybe or javascript somehow?  :D

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.