CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   DOM and JSON scripting (http://www.codingforums.com/forumdisplay.php?f=15)
-   -   onClick Function Help (http://www.codingforums.com/showthread.php?t=288287)

artysta 02-26-2013 12:37 AM

onClick Function Help
 
Hello all!

This is my website: www.damianplisko.com

Im trying to figure out a way to have the div to the left of the video show different information everytime the user clicks on the number below the video box. The problem is that the numbers below the video already have a function assigned to them to change the source of the video.

Help would be appreciated :)

WolfShade 02-26-2013 01:45 PM

Can you just add that functionality to the existing functions? Are you using jQuery?

sunfighter 02-26-2013 03:11 PM

onclick can execute a number of things. Call a function to change the div. Also suggest you add an ID to the div. If the ID were target the number one button could do this:
Code:

<li><a href="#" onClick="document.getElementById('target').innerHTML = 'A differt story'; addDynamicSource('DemoReel_Plisko'); return false;">1</a></li>

artysta 02-26-2013 03:50 PM

thanks guys, I will try this

artysta 02-27-2013 04:28 AM

it worked, thanks for the tip!


All times are GMT +1. The time now is 11:01 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.