Saturday, November 21, 2009

Javascript Popup

Within header of HTML document that launches the popup:
<script type="text/javascript">
var theURL = '/global_files/sending.php'
var width  = 200;
var height = 50;
function popWindow() {
newWindow = window.open(theURL,'newWindow','toolbar=no,menubar=no,left=200,top=300,resizable=no,scrollbars=no,status=no,location=no,width='+width+',height='+height);
}
 </script>
/global_files/sending.php:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<META NAME="Author" CONTENT="Lance Miller, this.is.lance.miller@gmail.com">
<title>
Sending
</title>
<style type="text/css" media="all">
  @import url("<?php echo ${css_remote}; ?>");
</style>
<style type="text/css">
body {
background:#CCCCCC;
color:#000000;
}
</style>
<script type="text/javascript">
var howLong = 3000;
t = null;
function closeMe(){
t = setTimeout("self.close()",howLong);
}

window.onload=function() {
closeMe()
self.focus()
}
</script>
</head>
<body>
sending please wait...
</body>
</html>

No comments: