Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder che_anj's Avatar
    Join Date
    Aug 2006
    Location
    Philippines
    Posts
    157
    Thanks
    12
    Thanked 3 Times in 3 Posts

    How to know that image is clicked

    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>

  • #2
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    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>
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph

  • #3
    New to the CF scene
    Join Date
    Aug 2008
    Location
    Canada
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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..


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •