x_goose_x
11-04-2002, 04:02 AM
Add to head:
<script language="javascript1.2" type="text/javascript">
submit_accept = false;
function chk_sub(bg,cl,tbg,tcl,txtbg,txtcl,frm) {
document.getElementById("eula").style.backgroundColor = bg;
document.getElementById("eula").style.color = cl;
document.getElementById("button1").style.backgroundColor = bg;
document.getElementById("button1").style.color = cl;
document.getElementById("button2").style.backgroundColor = bg;
document.getElementById("button2").style.color = cl;
document.getElementById("ttlbar").style.backgroundColor = tbg;
document.getElementById("ttlbar").style.color = tcl;
document.getElementById("txtarea2").style.backgroundColor = txtbg;
document.getElementById("txtarea2").style.color = txtcl;
l = ((parseInt(document.body.clientWidth)-380)/2);
t = ((parseInt(document.body.clientHeight)-424)/2);
if (l<0) { l=0 };
if (t<0) { t=0 };
document.getElementById("eula").style.display = "";
document.getElementById("eula").style.left = l;
document.getElementById("eula").style.top = t;
frm2 = frm;
}
function loader() {
tblhtml = '<table border="0" cellspacing="2" cellpadding="0" style="position: absolute; z-Index: 100; background-color: menu; width: 380px; height: 424px; border: 2px white outset; font-family: Tahoma; font-size: 11px; text-align: justify; display: none;" id="eula">'+
'<tr>'+
'<td style="width: 480; height: 20px; color: white; font-size: 12px; background-color: highlight; font-family: Arial; font-weight: bold;" id="ttlbar"> HTML Help Workshop 1.3</td>'+
'</tr>'+
'<tr>'+
'<td style="height: 20px; padding-left: 10px; padding-right: 10px;"><br>Please read the following agreement.<br><br></td>'+
'</tr>'+
'<tr>'+
'<td style="text-align: center;">'+
'<textarea style="width: 360px; height: 250px; font-family: Tahoma; font-size: 11px;" id="txtarea2" readonly></textarea></td>'+
'</tr>'+
'<tr>'+
'<td style="height: 20px; padding-left: 10px; padding-right: 10px;"><br>Do you accept all of the terms of the preceding License Agreement? If you Choose No, you will not be able to continue. To continue you must accept this agreement.<br><br></td>'+
'</tr>'+
'<tr>'+
'<td style="height: 20px; text-align: right; padding-right: 10px; padding-bottom: 10px;">'+
'<input type="button" value="Yes" style="width: 75px; height: 22px;" onclick="submit_accept = true; frm2.submit();" id="button1"> '+
'<input type="button" value="No" style="width: 75px; height: 22px;" onclick="document.getElementById(\'eula\').style.display=\'none\';" id="button2">'+
'</td>'+
'</tr>'+
'</table>'
tmp = document.getElementById('txtarea1').innerHTML;
document.getElementById('txtarea1').innerHTML = tblhtml;
document.getElementById('txtarea1').style.display = "";
document.getElementById('txtarea2').innerHTML = tmp;
}
window.onload = loader;
</script>
add to form:
onSubmit="chk_sub('menu','black','highlight','white','white','black',this); if (!submit_accept) { return false; };"
add to body:
<div id="txtarea1" style="display: none;">
This is my EULA!
</div>
Give it a try. http://pages.infinit.net/mvideos/agree.htm (http://pages.infinit.net/mvideos/agree.htm)
Tested in IE6
<script language="javascript1.2" type="text/javascript">
submit_accept = false;
function chk_sub(bg,cl,tbg,tcl,txtbg,txtcl,frm) {
document.getElementById("eula").style.backgroundColor = bg;
document.getElementById("eula").style.color = cl;
document.getElementById("button1").style.backgroundColor = bg;
document.getElementById("button1").style.color = cl;
document.getElementById("button2").style.backgroundColor = bg;
document.getElementById("button2").style.color = cl;
document.getElementById("ttlbar").style.backgroundColor = tbg;
document.getElementById("ttlbar").style.color = tcl;
document.getElementById("txtarea2").style.backgroundColor = txtbg;
document.getElementById("txtarea2").style.color = txtcl;
l = ((parseInt(document.body.clientWidth)-380)/2);
t = ((parseInt(document.body.clientHeight)-424)/2);
if (l<0) { l=0 };
if (t<0) { t=0 };
document.getElementById("eula").style.display = "";
document.getElementById("eula").style.left = l;
document.getElementById("eula").style.top = t;
frm2 = frm;
}
function loader() {
tblhtml = '<table border="0" cellspacing="2" cellpadding="0" style="position: absolute; z-Index: 100; background-color: menu; width: 380px; height: 424px; border: 2px white outset; font-family: Tahoma; font-size: 11px; text-align: justify; display: none;" id="eula">'+
'<tr>'+
'<td style="width: 480; height: 20px; color: white; font-size: 12px; background-color: highlight; font-family: Arial; font-weight: bold;" id="ttlbar"> HTML Help Workshop 1.3</td>'+
'</tr>'+
'<tr>'+
'<td style="height: 20px; padding-left: 10px; padding-right: 10px;"><br>Please read the following agreement.<br><br></td>'+
'</tr>'+
'<tr>'+
'<td style="text-align: center;">'+
'<textarea style="width: 360px; height: 250px; font-family: Tahoma; font-size: 11px;" id="txtarea2" readonly></textarea></td>'+
'</tr>'+
'<tr>'+
'<td style="height: 20px; padding-left: 10px; padding-right: 10px;"><br>Do you accept all of the terms of the preceding License Agreement? If you Choose No, you will not be able to continue. To continue you must accept this agreement.<br><br></td>'+
'</tr>'+
'<tr>'+
'<td style="height: 20px; text-align: right; padding-right: 10px; padding-bottom: 10px;">'+
'<input type="button" value="Yes" style="width: 75px; height: 22px;" onclick="submit_accept = true; frm2.submit();" id="button1"> '+
'<input type="button" value="No" style="width: 75px; height: 22px;" onclick="document.getElementById(\'eula\').style.display=\'none\';" id="button2">'+
'</td>'+
'</tr>'+
'</table>'
tmp = document.getElementById('txtarea1').innerHTML;
document.getElementById('txtarea1').innerHTML = tblhtml;
document.getElementById('txtarea1').style.display = "";
document.getElementById('txtarea2').innerHTML = tmp;
}
window.onload = loader;
</script>
add to form:
onSubmit="chk_sub('menu','black','highlight','white','white','black',this); if (!submit_accept) { return false; };"
add to body:
<div id="txtarea1" style="display: none;">
This is my EULA!
</div>
Give it a try. http://pages.infinit.net/mvideos/agree.htm (http://pages.infinit.net/mvideos/agree.htm)
Tested in IE6