Jquery issue between IE and FF

Posted on 2012-03-14
Last Modified: 2012-06-27
I have a checkbox that enables/disables a select menu and textarea which works fine but
I need this code to retain settings if a "Back" button is clicked on the POST page. FF retains the enabled settings but IE disables the form elements again which causes the input to be lost even though the checkbox is still checked. How do I make IE see that the form elements should still be enabled in jquery?

$(document).ready(function () { 
 $("#add_room").click(function () {  

Open in new window

Question by:jriver12
LVL 34

Accepted Solution

gr8gonzo earned 300 total points
ID: 37724989
Try this:

$(document).ready(function () {

 $("#add_room").click(function () {  
    addRoomEvent(this.checked, true);

 addRoomEvent( $("#add_room").is(':checked'), false );


function addRoomEvent(isChecked, setFocus)
   $("#room_type_additional").attr("disabled",!isChecked) ;
   $("#s_requests_add").attr("disabled",!isChecked) ;

Author Closing Comment

ID: 37725017
Excellent! Thank you.

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
AWK - Blank file output zero bytes why? 18 23
removing a class in javascript 4 50
Convert .csv to tab delimited text 11 36
Html Newline 7 21
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question