aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Javascript Radio button controlled submit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Javascript Radio button controlled submit" Watch "Javascript Radio button controlled submit" New topic
Author

Javascript Radio button controlled submit

Zein Nunna
Ranch Hand

Joined: Mar 31, 2005
Posts: 245
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

Joined: Jan 10, 2002
Posts: 61180
    
  66

Don't name anything "submit".


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Liu Zhixiang
Ranch Hand

Joined: Aug 12, 2006
Posts: 32
use "onselect" is wrong.
you should use "onfocus" or "onclick"
[ August 14, 2006: Message edited by: Liu Zhixiang ]

I Think Therefore I Am
Zein Nunna
Ranch Hand

Joined: Mar 31, 2005
Posts: 245
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Javascript Radio button controlled submit