testopen.html:
<html>
<head></head>
<body>
<div id="field1"></div>
<div id="field2"></div>
</body>
</html>
testopener.html:
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script>
</head>
<body>
<input id="field1" />
<input id="field2" />
<button id="opentest">test</button>
</form>
</body>
<script type="text/javascript">
$(function(){
var winopen = null;
$("#opentest").bind("click", function(){
if (winopen == null || winopen.closed){
winopen = window.open("testopen.html","", "left=100,top=100,width=250,height=150");
}
var field1 = $("#field1").val(),
field2 = $("#field2").val(),
ntry = 3,
sendMsg = function(){
if (winopen.document.readyState != "complete"){
if (ntry >= 0)
setTimeout(sendMsg, 1000);
ntry--;
return;
}
$(winopen.document.body).find("#field1").html(field1);
$(winopen.document.body).find("#field2").html(field2);
}
sendMsg();
});
});
</script>
links
http://jquery.com/demo/thickbox/
http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/
http://www.ericmmartin.com/projects/simplemodal/