PDA

View Full Version : Linking In Frames



syn0psis
12-15-2005, 03:11 PM
I have a 'Terms of Membership' agreement on my site. In order for the prospective client to proceed to my registration page, they must first agree to my terms.

In order for this to occur (so that they must actively participate and thus make a decision), I have included, at the bottom of my Terms page, an 'I Agree to Your Terms' checkbox.

The checkbox works perfectly with one exception. My site consists of three frames (top, left and main - although it appears frameless). When a client clicks the 'I Agree' checkbox and then the accompanying 'Proceed' button, a new window opens. My desire is to have it open.....without a new window or within the 'main' section.

Below is the code I am using in my header.


<script language="JavaScript"><!--
function BuyNow() {
if (document.frmAgreement.checkbox.checked) {
MyVal = 1;
} else {
MyVal = 0;
}
if (MyVal == 0) {
alert("You have not checked the Terms of Membership box. You cannot proceed with registering if you do not agree to abide by the Terms of Membership.");
} else {
<!-- PLACE LINK -->
window.open('../main/register.php');
}
}
// --></script>

Is what I am asking possible? Every javascript and/or DHTML tutorial I can locate responds with the assumption that a new window is desired.

Thanks!

Twey
12-15-2005, 03:43 PM
Instead of
window.open('../main/register.php');use
window.location.href= '../main/register.php';

syn0psis
12-15-2005, 03:48 PM
THANK YOU Twey!!

That worked perfectly!! :)

So close yet so far.