webmonkey is a good place to start some JS knowledge aquirement  http://hotwired.lycos.com/webmonkey/programming/_javascript_/tutorials/jstutorial_index.html  LOL!
Also, there are many scripts at _javascript_.internet.com for examples.  


Here is the basic logic outline though


function checkme()
{
    if(document.<formname>.paymentmethod.value == 'pruchase order' && document.<formname>.ponumber.value != '')
    {
        alert(' you missed a field message here');
        return false;
    }
    return true;
}


then in your form tag add checkme();"


something along those lines.
FYI...there's a kewl _javascript_ email list JS-Jive on www.houseoffucion.com too.


HTH


Doug

-----Original Message-----
From: Robert Orlini [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 21, 2004 1:05 PM
To: CF-Talk
Subject: OT radio button validation

Anyone have a quick _javascript_ code top check if a certain radio button is selected then a input field must have content?

The buttons are grouped as "paymentmethod". One is "credit card" and one is "purchase order". The input field "ponumber" must have content if "purchase order" radio button is selected.

I've looked on google but the examples are too complicated.

Thanks.

Robert O.
HWW
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to