/    Sign up×
Community /Pin to ProfileBookmark

Need two things to happen

On the pages below, I need two things to happen with the buttons on the left:
-mouseover change the image to the right
-click takes viewer to .html page

I tried JS only and an image map. Neither one will make both things happen. Help, please. Thank you.

[url]http://www.triplecreekproducts.com/index_test.html[/url]

[url]http://www.triplecreekproducts.com/index_imgmap.html[/url]

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@vwphillipsFeb 15.2005 — I like your pics

only looked at the imag map vesion

[code=php]
<area onclick="javascript:CngLoc('http://www.vicsjavascripts.org.uk');" onmouseover="ShowPic(this.title);" title="images/groups/childfthr.jpg"
shape="rect" coords="0, 243, 172, 278">

<area onclick="javascript:CngLoc('http://www.vicsjavascripts.org.uk');" onmouseover="ShowPic(this.title);" title="http://www.vicsjavascripts.org.uk/StdImages/One.gif"
shape="rect" coords="0, 282, 133, 305">

</map>

<script language="JavaScript" type="text/javascript">
<!--
function CngLoc(url){
window.top.location='http://www.vicsjavascripts.org.uk';
}
//-->
</script>
<img border="0" src="images/navbtns/pagetitles.gif" width="190" height="306" usemap="#FPMap0"></p>&nbsp;</td>


<td width="524" align="center" bgcolor="#663300" colspan="2" valign="top">
<p style="text-align: center">
&nbsp;</p>


PHP]

note the change from href to title else it will try and do both
let me know if you want the other one fixed


theotherone


[code=php]
<a href="http://www.vicsjavascripts.org.uk" onmouseover="lightup('pic10')" onmouseout="turnoff('pic10')">
<img border="0" src="images/navbtns/btnnewitems.gif" width="200" height="30" longdesc="New Items"></a></p>&nbsp;</td>

<td width="524" align="center" bgcolor="#663300" colspan="2" valign="top">
<p style="text-align: center">
<img border="0" id="Main" src="images/groups/chairfthr.jpg" width="398" height="600"></p>
</td>
</tr>
<tr>
<td width="784" align="center" bgcolor="#663300" height="30" colspan="3">
<font color="#FFFFff">
<div align="center">

[/code]


  • + changed function


  • [code=php]
    function lightup(imgName)
    {
    if (document.images)
    {
    imgOn=eval(imgName + "on.src");
    document.getElementById('Main').src=imgOn;
    }
    }

    function turnoff(imgName)
    {
    if (document.images)
    {
    imgOff=eval(imgName + "off.src");
    document.getElementById('Main').src= imgOff;
    }
    }

    [/code]


    you can also have mouseover changes to the buttons, colors or images

    get it working, the version you like, supply a link and let me know any other effects you would like

    email via [URL]http://www.vicsjavascripts.org.uk[/URL]
    Copy linkTweet thisAlerts:
    @ChristiauthorFeb 15.2005 — Thanks for your prompt reply!!

    The photos are beautiful, aren't they? Wish I could take credit for them, but I can't.

    Christi
    ×

    Success!

    Help @Christi spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 6.17,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @nearjob,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,
    )...