The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

What replaced "onSubmit" for forms in XHTML 1.0? by shorty822006-03-30 18:26:40
  Some more form help requested. by shorty822006-11-19 12:55:59
    Which bit isn't working? by fudje2006-03-30 19:02:06
      All I know is that I click "Submit" by shorty822006-03-30 19:04:08
        As I suspected, by fudje2006-03-30 19:07:40
          Neither work. (n/t) by shorty822006-03-30 19:10:40
            Case sensitivity again. by bwkaz2006-03-30 19:11:45
              Also, you need id="whatever" attributes on your fo by bwkaz2006-03-30 19:13:43
                And *also*, you need to keep id attributes unique. by bwkaz 2006-03-30 19:17:31
So you can't put an id of "story" on the textarea, because the form already has that id. (In fact, the form is what you're getting when you do the getElementById('story') right now; since the form's value is not 'no', the validation never fails.)

You should put an id on the 'no' radio button (perhaps 'no' would work?), then do:

if(document.getElementById('radiobuttonid').checked) {
alert(whatever);
return false;
}

(Since radio button DOM elements have a 'checked' property.)
[ Reply ]
                  He needs the name for form purposes. by fudje2006-03-30 19:19:35
                    Oh, right. by bwkaz2006-03-30 19:21:58

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)