[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 190
  • 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
 
gabrielPennybackReliability Business Tools Analyst IIAuthor 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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
gabrielPennybackReliability Business Tools Analyst IIAuthor 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
 
gabrielPennybackReliability Business Tools Analyst IIAuthor 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
 
gabrielPennybackReliability Business Tools Analyst IIAuthor 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

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

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