Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 186
  • Last Modified:

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

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
gabrielPennyback
Asked:
gabrielPennyback
  • 4
  • 3
1 Solution
 
lharrispvCommented:
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
 
gabrielPennybackAuthor Commented:
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
 
lharrispvCommented:
are you talking about in the bar on the left?  the images show up here
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
gabrielPennybackAuthor Commented:
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
 
gabrielPennybackAuthor Commented:
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
 
gabrielPennybackAuthor Commented:
Thanks again, and please accept my apology for not getting it right out of the box.

- John
0
 
lharrispvCommented:
LOL.. been there myself.  Glad I could help.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now