esto es lo que he hecho:
pagina.php
Código PHP:
Ver original<html>
<head>
<title>Modal Popup Demo</title>
<script language="javascript" src="jquery.js"></script>
<script language="javascript" src="modal.popup.js"></script>
<script type="text/javascript" src="js/cargaAjax.js"></script>
<script language="javascript">
$(document).ready(function() {
//Change these values to style your modal popup
var align = 'center'; //Valid values; left, right, center
var top = 100; //Use an integer (in pixels)
var width = 800; //Use an integer (in pixels)
var padding = 10; //Use an integer (in pixels)
var backgroundColor = '#FFF'; //Use any hex code
var source = 'demo.php'; //Refer to any page on your server, external pages are not valid e.g. http://www.google.co.uk
var borderColor = '#FFF'; //Use any hex code
var borderWeight = 4; //Use an integer (in pixels)
var borderRadius = 0; //Use an integer (in pixels)
var fadeOutTime = 300; //Use any integer, 0 = no fade
var disableColor = '#000'; //Use any hex code
var disableOpacity = 85; //Valid range 0-100
var loadingImage = 'images/lightbox-ico-loading.gif'; //Use relative path from this page
//This method initialises the modal popup
$(".modal").click(function() {
modalPopup(align, top, width, padding, disableColor, disableOpacity, backgroundColor, borderColor, borderWeight, borderRadius, fadeOutTime, source, loadingImage);
});
//This method hides the popup when the escape key is pressed
$(document).keyup(function(e) {
if (e.keyCode == 27) {
closePopup(fadeOutTime);
}
});
});
</script>
</head>
<body style="margin:20px;">
<h1>jQuery Popup Demo</h1>
<a class="modal" href="javascript:void(0);" onclick="cargarRecursos('unafuncion.js'); return false;">Demo</a><br/><br/>
</body>
</html>