/    Sign up×
Community /Pin to ProfileBookmark

Keeping a highlighted rollover on another page – Pls. Help

My navigation is setup so that when you click on a link, the image changes. However, I would like to keep this “selected/highlighted” state on the next page. This doesn’t seem to work since the navigation reloads on the new page. Ok, this is what I have.

[INDENT]<script language=”JavaScript” type=”text/javascript”>
<!–
var ImgPath=’http://www.vicsjavascripts.org.uk/StdImages/‘;

function MseOver(){
args=MseOver.arguments;
for (i=0;i<args.length-1;i=i+2){
img=document.getElementById(args[i])
if (!img.out){ img.out=img.src; }

if (!img.set){ img.src=ImgPath+args[i+1]; }
}
}

function MseOut(){
args=MseOut.arguments;
for (i=0;i<args.length-1;i=i+2){
img=document.getElementById(args[i])
if (!img.out){ img.out=img.src; }

if (!img.set){ img.src=ImgPath+args[i+1]; }
}
}

function MseClick(){
args=MseClick.arguments;
for (i=0;i<args.length-1;i=i+2){
img=document.getElementById(args[i])
img.src=ImgPath+args[i+1];
img.set=false;
}
}
//–>
</script></head>

<body>
<a href=”navTester2.php”><img src=”http://www.vicsjavascripts.org.uk/StdImages/One.gif” width=”50″ height=”30″ border=”0″ id=”Img1″ onClick=”MseClick(‘Img1′,’Three.gif’,’Img2′,’Three.gif’);” onMouseOver=”MseOver(‘Img1′,’Two.gif’,’Img2′,’Two.gif’);” onMouseOut=”MseOut(‘Img1′,’One.gif’,’Img2′,’One.gif’);”></a> [/INDENT]

How do I set it uip so that when a user clicks on a link, the graphics are shown in their highlighted/selected states. Keep in mind my navigation is an include.

Thanks to any and all.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@vwphillipsSep 05.2005 — could use a cookie see

[URL]http://www.vicsjavascripts.org.uk/MenuMemory/MenuMemory.htm[/URL]
Copy linkTweet thisAlerts:
@s1deusauthorSep 05.2005 — Thanks

I wound up cheesing it and hard coding all the pages since it wasn't a big site.

Thanks,
×

Success!

Help @s1deus 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 5.28,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...