MsKrissy
asked on
onclick issues html
I have the following code, it works in firefox and in IE, but the bolded sections don't work in Safari. Can anyone tell me why this is and how I can fix it?
<body>
<table border="0" cellpadding="0" cellspacing="0" hspace="0">
<tr>
<td><table border="0" cellpadding="0" cellspacing="0" hspace="0">
<tr>
<td><img src="images/column1.png" border="0" usemap="#Map">
<map name="Map">
[b] <area shape="rect" coords="1,321,219,436" href="main.php" title="Home">
<area shape="rect" coords="37,215,107,235" title="News" href="myIframe.location.href='scripts/sports_news.php';">
<area shape="rect" coords="40,251,157,271" title="Research" onClick="myIframe.location.href='scripts/researchTable.html';">
<area shape="rect" coords="40,288,155,306" title="Watchlist" onClick="myIframe.location.href='scripts/watchlistTable.html';">
<area shape="rect" coords="39,462,171,481" title="Competition" onClick="myIframe.location.href='scripts/competition.php';">
<area shape="rect" coords="39,500,204,519" title="Leaderboards" onClick="myIframe.location.href='scripts/leaderboard.php';">
<area shape="rect" coords="39,537,153,558" title="Contact Us" onClick="myIframe.location.href='scripts/html-contact-form.php';">
<area shape="rect" coords="389,570,477,597" title="Edit Profile" onClick="myIframe.location.href='scripts/edit_profile.php';">
</map></td>[/b]
<a href="#" id="sample"></a><td><iframe src="main_B.html" height="1300" width="800" frameborder="0" scrolling="no" name="myIframe"></iframe></td>
</tr>
</table></td>
</tr>
</table>
<div class="bg_clear" style="left:411px; top:189px;"><a href="scripts/logout.php">LOGOUT</a></div>
<div class="bg_clear" style="left:247px; top:206px; width:240px; height:360px;"><a href="#" id="sample"></a><iframe src="scripts/welcome.php" height="375" width="240" frameborder="0" scrolling="no" name="myIframe"></iframe></div>
</body>
Having ' name="myIframe" ' in two places may be confusing Safari. Are you expecting the links to appear in both iframes when you click on them?
ASKER
I only want to have the links appear in only one iframe. How do I fix it?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you so much, that was exactly it.