• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javascript Radio button controlled submit

 
Zein Nunna
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I am trying achieve something quite simple, I am trying to enable a form submit button only when a radio button [that says something along the lines, I accept terms..] has been selected, my code is below, but for some reason it doesnt work



I've searched through numerous forums/posts and cant see what the problem is.

Any ideas? Your thoughts will be much appreicated.

Regards
Zein
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't name anything "submit".
 
Liu Zhixiang
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use "onselect" is wrong.
you should use "onfocus" or "onclick"
[ August 14, 2006: Message edited by: Liu Zhixiang ]
 
Zein Nunna
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much guys,

Changed the button name from "submit" to "button123" and onSelect changed to onClick, and everything works like a charm.



Regards
Zein
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic