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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.