Radio buttons

Discussion in 'JavaScript' started by XandroZ, Jul 24, 2007.

  1. #1
    I have a radio buttons group and if someone click (onclik=) I call a javascript function that put some results in textfields in function of what radio button is clicked(check)

    I want to put initial some results in the textfield(automate).
    So I need an event something like "oncheck" execute function and put the initial results.Exist such a event?(I can use another function to check but Itry without other function)
     
    XandroZ, Jul 24, 2007 IP
  2. sdemidko

    sdemidko Member

    Messages:
    81
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #2
    yes, there's such events: onCheck, onunCheck, so you can use this to fill the results.
    or you can just process onclick and check if this.checked=true or not.
     
    sdemidko, Jul 25, 2007 IP
  3. NoamBarz

    NoamBarz Active Member

    Messages:
    242
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    58
    #3
    I don't quite get it. You could use PHP or ASP to insert the initial values inot the textfields, so that they are there when the page loads. Other than that, I don't see a difference between onclick and oncheck...why not use the event "document.onload" ?
     
    NoamBarz, Jul 25, 2007 IP
  4. XandroZ

    XandroZ Peon

    Messages:
    395
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    thx for your opinions, but I resolved the problem.
     
    XandroZ, Jul 26, 2007 IP