Solved

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

Posted on 2009-07-06
7
179 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article discusses how to implement server side field validation and display customized error messages to the client.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

734 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