Well, I have a javascript problem which I find really complicated. I'm not an expert, I'm just a beginner. I worked hard trying to do something special but faced the following problem:
I have [IMAGE A] [IMAGE B] [IMAGE C]
&
[IMAGE 1] [IMAGE 2] [IMAGE 3] [IMAGE 4] [IMAGE 5] [IMAGE 6] [IMAGE 7] [IMAGE 8] [IMAGE 9]
When the user clicks on [IMAGE A] -> [IMAGE 1] [IMAGE 2] [IMAGE 3] appear
when the user clicks on [IMAGE B] -> [IMAGE 4] [IMAGE 5] [IMAGE 6]
appear, replacing [IMAGE 1] [IMAGE 2] [IMAGE 3]
when the user clicks on [IMAGE C] -> [IMAGE 4] [IMAGE 5] [IMAGE 6]
appear, replacing [IMAGE 4] [IMAGE 5] [IMAGE 6]
AND VICE VERSA..!
I have developed some functions to do so. I have also developed some other functions so when the user clicks on [IMAGE 1], [IMAGE 2], [IMAGE 3], [IMAGE 4], [IMAGE 5], [IMAGE 6], [IMAGE 7], [IMAGE 8], or [IMAGE 9], he gets onMouseOver, onMouseOut, & onClick events.
THE PROBLEM IS:
when the user clicks on [IMAGE 1], [IMAGE 2], or [IMAGE 3], the events work fine for only these 3 images but they generate some errors regarding the replacement issue. Also they only work for [IMAGE 1], [IMAGE 2], & [IMAGE 3] but not for the other images. I guess I know the reason which is images [IMAGE 1], [IMAGE 4], & [IMAGE 7] have the same position, [IMAGE 2], [IMAGE 5], & [IMAGE 8] have the same position, & [IMAGE 3], [IMAGE 6], & [IMAGE 9] have the same position.
I know it's complicated but anyway, I have figured 3 ideas that may help
1. Edit The Original Functions (very hard to do, they are 1000+ lines & hard to trace).
2. Switch between onClick Events like onClick="stay('image6') or changeimagexetra() " I dunno how to do that thing or even if it's possible to do.
3. Use Switch statement but I'm not familiar with it & most of the examples online are not that useful.
That's the problem I'm facing...Let me know your opinion.
I have [IMAGE A] [IMAGE B] [IMAGE C]
&
[IMAGE 1] [IMAGE 2] [IMAGE 3] [IMAGE 4] [IMAGE 5] [IMAGE 6] [IMAGE 7] [IMAGE 8] [IMAGE 9]
When the user clicks on [IMAGE A] -> [IMAGE 1] [IMAGE 2] [IMAGE 3] appear
when the user clicks on [IMAGE B] -> [IMAGE 4] [IMAGE 5] [IMAGE 6]
appear, replacing [IMAGE 1] [IMAGE 2] [IMAGE 3]
when the user clicks on [IMAGE C] -> [IMAGE 4] [IMAGE 5] [IMAGE 6]
appear, replacing [IMAGE 4] [IMAGE 5] [IMAGE 6]
AND VICE VERSA..!
I have developed some functions to do so. I have also developed some other functions so when the user clicks on [IMAGE 1], [IMAGE 2], [IMAGE 3], [IMAGE 4], [IMAGE 5], [IMAGE 6], [IMAGE 7], [IMAGE 8], or [IMAGE 9], he gets onMouseOver, onMouseOut, & onClick events.
THE PROBLEM IS:
when the user clicks on [IMAGE 1], [IMAGE 2], or [IMAGE 3], the events work fine for only these 3 images but they generate some errors regarding the replacement issue. Also they only work for [IMAGE 1], [IMAGE 2], & [IMAGE 3] but not for the other images. I guess I know the reason which is images [IMAGE 1], [IMAGE 4], & [IMAGE 7] have the same position, [IMAGE 2], [IMAGE 5], & [IMAGE 8] have the same position, & [IMAGE 3], [IMAGE 6], & [IMAGE 9] have the same position.
I know it's complicated but anyway, I have figured 3 ideas that may help
1. Edit The Original Functions (very hard to do, they are 1000+ lines & hard to trace).
2. Switch between onClick Events like onClick="stay('image6') or changeimagexetra() " I dunno how to do that thing or even if it's possible to do.
3. Use Switch statement but I'm not familiar with it & most of the examples online are not that useful.
That's the problem I'm facing...Let me know your opinion.