...

View Full Version : How to know that image is clicked



che_anj
08-30-2008, 02:19 PM
Hi everyone,

I would like to ask do u have any idea how to put a basis that the image is clicked?




I really need some help thanks





<a href="javascript:scroll(0,0);javascript:loadFile('p_plaza',{file:'http://www.test.com/uploads/video/63/clip1_flv_Medium.flv'});javascript:setTimeout(sendEvent('playpause'), 100);"><img src="http://www.dttl.tv/index2.php?option=com_resource&task=show_picture&no_html=1&size=blog&picture=168" alt="Blog Picture" align="base" hspace="8" vspace="0" /></a>

rangana
08-31-2008, 08:02 AM
<a href="javascript:alert('I\'m clicked');javascript:scroll(0,0);javascript:loadFile('p_plaza',{file:'http://www.test.com/uploads/video/63/clip1_flv_Medium.flv'});javascript:setTimeout(sendEvent('playpause'), 100);"><img src="http://www.dttl.tv/index2.php?option=com_resource&task=show_picture&no_html=1&size=blog&picture=168" alt="Blog Picture" align="base" hspace="8" vspace="0" /></a>

olivierp
08-31-2008, 08:50 PM
try using the onclick to set a variable.

something like <a href='#' onclick='checkIfClicked(isClicked);'>Link</a>


function checkIfClicked(){
var isclicked = 'yes';
}

then you can use that variable to check if it has been clicked.

if(isclicked == 'yes'){
do this or that
}

And at the top of the page, ensure you set this variable to null

isclicked = '';

I did not test, but that should work amongs many other ways I'm sure.
Hope this helps..



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum