Javascript in my php file:
- Code: Select all
<!--Pop Up Terms Window-->
<SCRIPT TYPE="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=400,height=200,scrollbars=yes');
return false;
}
//-->
</SCRIPT>
<!--Agree check box-->
<script language="javascript1.2">
function yes_no()
{
var agree=document.Agree.agree.checked;
if (agree == true){
return true;
}else{
alert("you must agree to terms if you would like to submit a story");
return false;
}
}
</script>
<!--load page back in parent window-->
<script>
function loadinparent(url){
self.opener.location = url;
}
//-->
</SCRIPT>
And this is what I have for the agree check box and submit button in the pop up window.
- Code: Select all
If you agree to the terms and conditions above please check the box below and press submit.
<form method="get" action="javascript:loadinparent('http://www.cbchronicles.com/submit-story.html', true)" onsubmit="return yes_no(this.form) "name="Agree">
<INPUT name="agree" name="agree" value="agree" type="checkbox"> I agree to terms <input type="submit" name="submit" value="Accept Terms"> </form>


