My experience with Javascript is severely limited, which is my disclaimer for the following question/problem.
I have to code links that take the user away from our site with a disclaimer and acknowledgement 'speed bump'. A link clicked on our site that leads to another will generate a pop up window with the verbiage and a button. After they click the button, they are redirected to the intended site. I cannot use server-side scripting with the host we use, but I read that variables can be passed between windows utilizing window.name.
I've decided to use an external file because as I refine this procedure, I need to set cookies that allow the user to choose not to display the message again. But at this point I just want to at least figure out how to accomplish this task before I confuse myself with the cookie issue, since I'm as inexperienced with cookies as I am with Javascript.
The external file includes the following code:
The link on our site is coded as follows:
The code on the speed bump page button is:
Can anyone tell me what I'm doing wrong?
I have to code links that take the user away from our site with a disclaimer and acknowledgement 'speed bump'. A link clicked on our site that leads to another will generate a pop up window with the verbiage and a button. After they click the button, they are redirected to the intended site. I cannot use server-side scripting with the host we use, but I read that variables can be passed between windows utilizing window.name.
I've decided to use an external file because as I refine this procedure, I need to set cookies that allow the user to choose not to display the message again. But at this point I just want to at least figure out how to accomplish this task before I confuse myself with the cookie issue, since I'm as inexperienced with cookies as I am with Javascript.
The external file includes the following code:
Code:
function openExt (id) {
if (window.name==link1) {
id="[URL unfurl="true"]http://www.consumer.gov/"[/URL]
}
window.open("../scripts/speed-bump.html", "", "toolbar=yes,resizable=yes,location=yes,directories=yes,status=yes,menubar=yes,width=600,height=500,scrollbars=yes,screenX=0,screenY=0,top=0,left=0", id)
}
function go()
{
id=window.name;
window.location=id;
}
The link on our site is coded as follows:
Code:
<a href="javascript: openExt(link1)" id="link1">Consumer Info
from the Federal Government</a>
The code on the speed bump page button is:
Code:
<input type="button" class="button" value="Ok" onclick="go()" />
Can anyone tell me what I'm doing wrong?