A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: ok, this is crazy

  1. #1
    Senior Member
    Join Date
    Mar 2001
    Have I had my head in this code for too long? Is there something obvious I'm missing?

    if (document.forms[0].sng[0].checked == true) {
             var sng = document.forms[0].sng[0].value
          } else {
          if (document.forms[0].sng[1].checked == true) {
             var sng = document.forms[0].sng[1].value
          } else { var sng }
    Preeee-ty simple here. Find which radio button is checked and define the variable based on the radio's value.

    Doesn't work!

    But, this does -
    sng = document.forms[0].sng[0].value
    even if I used sng[1] it would still define the variable, so that tells me it has a problem with the IF, so I set the "all else fails" to sng = "Yes" - still didn't work.

    So what's up?

  2. #2
    Senior Member
    Join Date
    Mar 2001


    I was looking in the wrong direction - found a capitalization error...

    hehe, thanks for looking though!

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

HTML5 Development Center