Solved

Opening a different url for each image in a javascript slide show

Posted on 2009-07-06
7
181 Views
Last Modified: 2012-05-07
Is it possible to have a different onclick event for each of the images in the code below? Please let me know if you need to see the javascript to answer the question. Here's the web page in question: http://excelitup.com

Thnaks,

John
<ul class="mainGraphic" onclick="MM_openBrWindow('PhotoGallery1_beta1.html','','width=940,height= 720')">
            	<li><img src="images/RHBDetail.png" /></li>
		<li><img src="images/BrokerFormDetail.png" /></li>
</ul>

Open in new window

0
Comment
Question by:gabrielPennyback
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 8

Accepted Solution

by:
lharrispv earned 500 total points
ID: 24788384
yes it is possible.  You can either change the code you have above to this:

<ul class="mainGraphic" >
                  <li ><img src="images/RHBDetail.png" onclick="MM_openBrWindow('PhotoGallery1_beta1.html','','width=940,height=

720')"/></li>
            <li><img src="images/BrokerFormDetail.png" onclick="MM_openBrWindow('PhotoGallery1_beta1.html','','width=940,height=

720')"/></li>
</ul>

making sure that with each image you change the html page it is pointing to or you can more simply do this:

<ul class="mainGraphic" >
<li><a href="page1.html><img src=""></a></li>
<li><a href="page2.html><img src=""></a></li>
</ul>


0
 
LVL 1

Author Comment

by:gabrielPennyback
ID: 24789108
I tried the first one and nothing happened. I tried the second one and the images didn't show up at all. I must be doing something wrong. Please take a look at the source code to the web page, and let me know if there's some reason it's not working for me. If you have the time to try it out yourself, you can download the js here: http://www.discretedata.com/scripts/jquery.innerfade.js

Thanks,

John
0
 
LVL 8

Expert Comment

by:lharrispv
ID: 24789263
are you talking about in the bar on the left?  the images show up here
0
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
LVL 1

Author Comment

by:gabrielPennyback
ID: 24790567
Yes the two rotating images on the left. They show up properly as it is now, but not when I implement your second suggestion. Nothing happens (i.e., no url or window shows up when I click on the images.
0
 
LVL 1

Author Comment

by:gabrielPennyback
ID: 24791224
Wow, I owe you an apology. I finally slowed myself down enough to figure out why they weren't working, and now I see that they both work great.

Thanks!

John
0
 
LVL 1

Author Closing Comment

by:gabrielPennyback
ID: 31600297
Thanks again, and please accept my apology for not getting it right out of the box.

- John
0
 
LVL 8

Expert Comment

by:lharrispv
ID: 24793144
LOL.. been there myself.  Glad I could help.
0

Featured Post

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question