Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with onclick

Status
Not open for further replies.

wrmedia

Technical User
Jun 6, 2002
19
US
trying to put together my first onclick swap image and go to different page routine

below is the code inserted into the html file

the images will swap out but I don,t think the page redirect is working?

I,m stuck

<!doctype html public &quot;-//w3c//dtd html 4.0 transitional//en&quot;>
<html>
<head>
<script language=&quot;JavaScript&quot;><!--

function flip(name,src) {
if (document.images)
document.images[name].src = src;
}
//--></script>

<title>Data Control Home Menu</title>
</head>
<body text=&quot;#ffffff&quot; bgcolor=&quot;#ffffff&quot;>
<center>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=&quot;482&quot;>
<tr>
<td colspan=&quot;4&quot;><img SRC=&quot;topdc.gif&quot; width=482 height=149 border=0></td>
</tr>
<tr>
<td valign=&quot;top&quot; rowspan=&quot;4&quot;><img SRC=&quot;ldc.gif&quot; width=31 height=116 border=0></td>
<td valign=&quot;top&quot;><img SRC=&quot;generalin.gif&quot; width=135 height=29 border=0></td>
<td valign=&quot;top&quot; rowspan=&quot;4&quot;><img SRC=&quot;generaldc.gif&quot; width=279 height=116 border=0></td>
<td valign=&quot;top&quot; rowspan=&quot;4&quot;><img SRC=&quot;rdc.gif&quot; width=37 height=116 border=0></td>
</tr>
<tr>
<td valign=&quot;top&quot;><a href=&quot;services.html&quot; onClick=&quot;flip('general1','servicesin.gif');return false&quot;><img SRC=&quot;servicesout.gif&quot; name=&quot;general1&quot; width=135 height=29 border=0></a></td>
</tr>
<tr>
<td valign=&quot;top&quot;><a href=&quot;experience.html&quot; onClick=&quot;flip('general2','experiencein.gif');return false&quot;><img SRC=&quot;experienceout.gif&quot; name=&quot;general2&quot; width=135 height=29 border=0></a></td>
</tr>
<tr>
<td valign=&quot;top&quot;><a href=&quot;talk.html&quot; onClick=&quot;flip('general3','talkin.gif');return false&quot;><img SRC=&quot;talkout.gif&quot; name=&quot;general3&quot; width=135 height=29 border=0></a></td>
<tr>
<td colspan=&quot;4&quot;><img SRC=&quot;botdc.gif&quot; width=482 height=90 border=0></td>
</tr>
</table>
</center>
</body>
</html>
 
Code:
function flip(name,src) { document.name.src = src; }
---------------------------------------
wmail.jpg


someone knowledge ends where
someone else knowledge starts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top