gregw
03-25-2003, 06:20 AM
I'm trying to open a small window after clicking on a image but the same text content is loaded in the main window also.
Here's a sample of the code...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Ticket Selection</title>
<script type="text/javascript" language="javascript">
var iBoxmax = 10; //maximum number allowed
function boxLimit(oLastbox, iMax) {
var oEl, e = 0, iChecked = 0, f = document.forms[0];
var sMsg = '\nHey wait a minute! You have picked more than 1 game.\n\n';
sMsg += 'Please choose only 10 dates. Thanks.\n\n';
while (oEl = f.elements[e++]) if (oEl.type == 'checkbox' && oEl.checked) ++iChecked;
if (iChecked > iMax) {
alert(sMsg);
return (oLastbox.checked = false);
}
}
</script>
</head>
<body>
<!--Start of the game selection code-->
<center><font face="arial black">Pick Your Games</font></center><p>
<table border="1">
<tr>
<td><font face="arial" size="2">APRIL<p>
<form name="choice" method=post ENCTYPE = "text/plain" action="mailto:gwolfe@wi.rr.com">
<input type="checkbox" name="choice" value="4/14" onclick="if (this.checked)boxLimit(this,iBoxmax)"> Monday, April 14th vs. STL at 7:05pm <a href="414.html"><img src="../Brewers/promo.gif" width="13" height="13" border="0" alt="promo.gif - 55 Bytes" onClick="window.open('414.html','Popup_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,sc rollbars=no,resizable=yes,copyhistory=no,width=250,height=200')"></a><br>
Thanks for your help!
Here's a sample of the code...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Ticket Selection</title>
<script type="text/javascript" language="javascript">
var iBoxmax = 10; //maximum number allowed
function boxLimit(oLastbox, iMax) {
var oEl, e = 0, iChecked = 0, f = document.forms[0];
var sMsg = '\nHey wait a minute! You have picked more than 1 game.\n\n';
sMsg += 'Please choose only 10 dates. Thanks.\n\n';
while (oEl = f.elements[e++]) if (oEl.type == 'checkbox' && oEl.checked) ++iChecked;
if (iChecked > iMax) {
alert(sMsg);
return (oLastbox.checked = false);
}
}
</script>
</head>
<body>
<!--Start of the game selection code-->
<center><font face="arial black">Pick Your Games</font></center><p>
<table border="1">
<tr>
<td><font face="arial" size="2">APRIL<p>
<form name="choice" method=post ENCTYPE = "text/plain" action="mailto:gwolfe@wi.rr.com">
<input type="checkbox" name="choice" value="4/14" onclick="if (this.checked)boxLimit(this,iBoxmax)"> Monday, April 14th vs. STL at 7:05pm <a href="414.html"><img src="../Brewers/promo.gif" width="13" height="13" border="0" alt="promo.gif - 55 Bytes" onClick="window.open('414.html','Popup_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,sc rollbars=no,resizable=yes,copyhistory=no,width=250,height=200')"></a><br>
Thanks for your help!