Welcome to Omgili,
Omgili ( Oh My God I Love It ;) is a search engine for discussions. With Omgili you can find answers and solutions, debates, discussions, personal experiences, opinions and more... To learn more about Omgili click here.
This is a complete preview of the discussion as it was indexed by Omgili crawlers. Use this preview if the original discussion is unavailable.
Click here to view the original discussion.
[http://www.codingforums.com/showthread.php?t=147...]
Click here to search for discussions with Omgili discussions search engine.
 |
How to know that image is clicked - CodingForums.com
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
Code: <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>
|
 |
|
Code: <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>
|
 |
|
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..
|
|
|
|