Show content with fancybox like a Javascript Alert
Posted
by
Ron Lens
on Stack Overflow
See other posts from Stack Overflow
or by Ron Lens
Published on 2011-01-09T22:43:50Z
Indexed on
2011/01/10
12:54 UTC
Read the original article
Hit count: 215
I try to show the content from a PHP-file in a fancybox but I can't handle it.
Now it's the following situation:
If a file permission problem occures a <div id="error">
is shown on the website. I'd like to have the content from <div id="error">
in fancybox. Everything I try I get the notice "The requested content cannot be loaded. Please try again later."
That means the fancybox, it the file permission error occures, should be shown when the page is loading and not like usual shown when some events like click or mouseover.
For example, if the error exists, the following content should be shown in the fancybox:
<div style="width:100px; height:100px; background:#f00;">
<p>Failure</p>
</div>
This snippet is located in a file security_check.php
. Now there are two possibilities. The 1st is to load the security_check.php
directly into the fancybox or to put in the mentioned above snippet.
So: how to load file contents into the fancybox?
© Stack Overflow or respective owner