Events Question..?

Results 1 to 2 of 2

Thread: Events Question..?

  1. #1
    Join Date
    Dec 1969

    Default Events Question..?

    If I&#039;ve assigned an onClick event to an object like:<BR><BR>&#060;img src="" onClick="doSomething();"&#062;<BR><BR>How can I change this objects onClick event through CS code..?<BR><BR>So that when the images initial click event is fired the "doSomething" function changes it&#039;s click event to do something different....<BR><BR>Any help would be great..!

  2. #2
    Join Date
    Dec 1969

    Default Huh?

    &#060;SCRIPT Language=JavaScript&#062;<BR>var clickedOnce = false;<BR><BR>function doSomething( )<BR>{<BR> if ( clickedOnce ) <BR> {<BR> // do one thing if this is second or later click<BR> } else {<BR> clickedOnce = true; // mark as clicked<BR> // do something else if this is the first click<BR> }<BR>}<BR>&#060;/SCRIPT&#062;<BR><BR>******************<BR>Why would you need something more complex than that???<BR><BR>

Posting Permissions

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