wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes jQuery 1.8.2 Disable Radio Button 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 "jQuery 1.8.2 Disable Radio Button" Watch "jQuery 1.8.2 Disable Radio Button" New topic
Author

jQuery 1.8.2 Disable Radio Button

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1393
This was working in jQuery 1.7.2 but is not working with 1.8.2

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60780
    
  65

Try quoting radio.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
If you looked at the console it should say:

Error: Syntax error, unrecognized expression: [input[type=radio][value="PPM"]


which really seems to show the problem.



Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60780
    
  65

Heh, missed that, Good eye.
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1393
Bear Bibeault wrote:Try quoting radio.


Thanks.

There are several little glitches I am having since moving to jQuery 1.8.2 like some hyperlinks or input tags, even radio buttons that have an onclick event have to be clicked twice before the event fires.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60780
    
  65

Many of these may be a result of tightening up on leniency with selector errors; such as not quoting attribute values. I'd go through and verify that your selectors all work as expected wherever you are having problems.

The JavaScript console is your best bud for things like this.
Michael Matola
whippersnapper
Ranch Hand

Joined: Mar 25, 2001
Posts: 1746
    
    2
Bear Bibeault wrote:Many of these may be a result of tightening up on leniency with selector errors; such as not quoting attribute values.


When I saw the question I too thought the problem was that radio wasn't in quotes. I was pretty surprised to see in the jQuery documentation that the attribute value "can be either an unquoted single word or a quoted string."

http://api.jquery.com/attribute-equals-selector/

So it looks like [type=radio] is valid. But I hear what Bear's saying about about tightening up on leniency. It's valid currently. I'd tend to future-proof it by putting radio in quotes.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jQuery 1.8.2 Disable Radio Button
 
Similar Threads
How to use external data source in jQuery UI
Use JQuery to Disable Radio Button
jQuery 1.8.2 has become un-case sensitive?
jQuery load with Callback versus Document Ready Method
animate function not working for jquery