Internet Explorer does not recognize the onClick behavior in drop-down menus
Hey there. I have a website in which I want to use the Swap Image code built into Dreamweaver. My goal is to have a drop-down menu of titles of various photos on my website, and when a user clicks on a title from the drop-down menu, the image on the page switches to the corresponding selection, along with the text of a field to change.
I used the onClick behavior for each option in the drop-down menu. In the great and powerful Firefox, doing this works perfectly - user clicks specific title, image and text change accordingly. Unfortunately I have had no luck running this page in Internet Explorer, for when you click on an item in the drop-down menu in IE, nothing happens.
Here is the code that Dreamweaver generates for the Swap Image script:
<script language="JavaScript" type="text/JavaScript">
0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i
</script>
And this is the code I am using for the drop-down menu:
CHENEY 2000
CAMEL BOXING
JALEPENO
photography
music
art
Does anyone know of a way to get around this in Internet Explorer, or should I just add it to this list of reasons why to never use IE anymore? Obviously Explorer is not recognizing the onClick behavior when it is part of an option in a drop-down menu, and if there's a way to change that I would surely like to know.
Thank you!
Brian
KarenArt posted this at 11:18 — 5th September 2004.
She has: 354 posts
Joined: May 2001
Well I've never used MM_swapImage for rollovers or swapping (way too much coding for me) so I'm not exactly sure what's going on.
Have you tried onChange instead of onClick yet?
btw my opinion... there are sooooo many reasons IE is a bad system which ignores so many web standards, it's really annoying that we web designers have to even acknowledge it. ...but I guess we do.
Best of luck!
Maybe one of the dreamweaver people around here can be more help.
*Edit: Looking at my old pages I guess I did use MM once, but I never could figure out what was going on so I didn't even remember using it.
gotta finish redesigning my sites so I can show them again.
The purpose of education is... to get more jokes!
waffles3303 posted this at 18:01 — 5th September 2004.
They have: 3 posts
Joined: Sep 2004
I have tried onChange and that doesn't work either. The only reason I am using the Dreamweaver rollover code is because the left side of my brain is useless, so I look towards button-pushing operations.
The answer for me doesn't have to lie with the Dreamweaver rollover code if anyone else knows a way around this with a different approach to DW's swap image.
Long live Mozilla!
waffles3303 posted this at 18:48 — 5th September 2004.
They have: 3 posts
Joined: Sep 2004
I discovered that this:
asdfasdf
asdfadfaf
...will swap the image to heyjoe.jpg on the first change.
Is there a way to tell the browser to replace '/art/images/heyjoe.jpg' with the value that is selected in the drop down menu?
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.