#1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Posts
    2,568
    Rep Power
    171

    Why does alert(payment_option) alerts undefined?


    Hi;

    In this page, click on Book Now, then radio button click on Paypal, it should alert Paypal. Why doesn't it?

    It's line 466 in source.

    Thank you
  2. #2
  3. A Not To Shabby Code Smurf
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2008
    Posts
    1,041
    Rep Power
    119
    You are alerting the value of the input element "focus_element"; and..., it's value is "none". To get your code to alert "paypal"; then, you need to do this:
    Code:
    radioCollection = document.forms[formName].elements['payment_option'].value;
    alert(radioCollection);

IMN logo majestic logo threadwatch logo seochat tools logo