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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 35

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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
In a recent question ( here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

734 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