Results 1 to 2 of 2

Thread: onclick Unclick?

  1. #1

    Thread Starter
    Fanatic Member merhaba's Avatar
    Join Date
    Sep 2002
    Location
    Istanbul,Bartin-Gallipoli(Gelibolu-Canakkale)
    Posts
    601

    onclick Unclick?

    hi,

    It is easy to start and stop an event in VB by clicking the same button twice...How is it in Javascript?

    vb code:
    ------------------------
    timer1.enabled=Not(timer1.enabled)
    -----------------------------------
    when we press command1 button once timer starts and when we
    press it twice timer1 stops

    Is it possible in Javascript? does onclick/Unclick evnent work?

    thanks

  2. #2
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    set a boolean flag to false
    if flag = false, run on if
    after first click it becomes true
    then next time it'll not be flase, so it'll run another section.
    Have I helped you? Please Rate my posts.

Posting Permissions

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



Click Here to Expand Forum to Full Width