SteveH
07-16-2009, 10:28 AM
Hello
I have the following images on an HTML page:
<table border="0">
<tr valign="top" align="center">
<td width="175">
<div style="border-right: 1px solid blue;">
<a href="newXP\imagemenu\page1.html"><img src="WinXp_use.jpg" WIDTH=87 HEIGHT=54 title="XP logo" alt="XP"></a>
<p><b>Windows XP</b></p>
</div>
</td>
<td width="175">
<div style="border-right: 1px solid blue;">
<a href="newVista\imagemenu\page1.html"><img src="VistaLo.gif" WIDTH=55 HEIGHT=54 title="Vista logo" alt="Vista"></a>
<p><b>Windows Vista</b></p>
</div>
</td>
<td width="175">
<div style="border-right: 1px solid blue;">
<a href="win7\imagemenu\page1.html"><img src="7_logo.gif" WIDTH=87 HEIGHT=54 title="Windows 7 logo" alt="Windows 7"></a>
<p><b>Windows 7</b></p>
</div>
</td>
<td width="175">
<div style="border-right: 1px solid blue;">
<a href="newMac\imagemenu\page1.html"><img src="logo_Apple1_Red54.jpg" WIDTH=57 HEIGHT=54 title="Apple Mac logo" alt="Apple Mac"></a>
<p><b>Apple Mac</b></p>
</div>
</td>
</tr>
</table>
I have some JavaScript which asks the user to agree to the terms and conditions and when they do they move to the next page:
<script type="text/javascript">
<!--
function checkCheckBoxAgree(c){
if (c.agree_text.checked == false )
{
alert("Please accept the university's terms and conditions");
return false;
}else
return true;
}
//-->
</script>
and then this:
<form name="agreeform" action="#">
I agree to accept the terms and conditions of the MMU: <input name="agree_text" type="checkbox" value="0">
<a href="demo_tc_done.html" onclick="return checkCheckBoxAgree(document.forms['agreeform'])">click</a>
Most users will click on the image (above) which is appropriate to their operating system before checking the box asking them to accept the terms and conditions.
What I would like is when they click whichever image they get an alert box asking them to accept the terms and conditions (unless they have done so already). When they have chekced the 'accept' box, they will then need to click on the image again, but in the JavaScript code I have posted they are
taken to one particular Web page, namely demo_tc_done.html instead of that Web page appropriate to the image they have clicked on.
As each image in my code links to a different Web page, how would I do that?
Thanks for any help.
Steve
I have the following images on an HTML page:
<table border="0">
<tr valign="top" align="center">
<td width="175">
<div style="border-right: 1px solid blue;">
<a href="newXP\imagemenu\page1.html"><img src="WinXp_use.jpg" WIDTH=87 HEIGHT=54 title="XP logo" alt="XP"></a>
<p><b>Windows XP</b></p>
</div>
</td>
<td width="175">
<div style="border-right: 1px solid blue;">
<a href="newVista\imagemenu\page1.html"><img src="VistaLo.gif" WIDTH=55 HEIGHT=54 title="Vista logo" alt="Vista"></a>
<p><b>Windows Vista</b></p>
</div>
</td>
<td width="175">
<div style="border-right: 1px solid blue;">
<a href="win7\imagemenu\page1.html"><img src="7_logo.gif" WIDTH=87 HEIGHT=54 title="Windows 7 logo" alt="Windows 7"></a>
<p><b>Windows 7</b></p>
</div>
</td>
<td width="175">
<div style="border-right: 1px solid blue;">
<a href="newMac\imagemenu\page1.html"><img src="logo_Apple1_Red54.jpg" WIDTH=57 HEIGHT=54 title="Apple Mac logo" alt="Apple Mac"></a>
<p><b>Apple Mac</b></p>
</div>
</td>
</tr>
</table>
I have some JavaScript which asks the user to agree to the terms and conditions and when they do they move to the next page:
<script type="text/javascript">
<!--
function checkCheckBoxAgree(c){
if (c.agree_text.checked == false )
{
alert("Please accept the university's terms and conditions");
return false;
}else
return true;
}
//-->
</script>
and then this:
<form name="agreeform" action="#">
I agree to accept the terms and conditions of the MMU: <input name="agree_text" type="checkbox" value="0">
<a href="demo_tc_done.html" onclick="return checkCheckBoxAgree(document.forms['agreeform'])">click</a>
Most users will click on the image (above) which is appropriate to their operating system before checking the box asking them to accept the terms and conditions.
What I would like is when they click whichever image they get an alert box asking them to accept the terms and conditions (unless they have done so already). When they have chekced the 'accept' box, they will then need to click on the image again, but in the JavaScript code I have posted they are
taken to one particular Web page, namely demo_tc_done.html instead of that Web page appropriate to the image they have clicked on.
As each image in my code links to a different Web page, how would I do that?
Thanks for any help.
Steve