Commits

Owen Nelson  committed eac79fc

IE compat

  • Participants
  • Parent commits caceb9b

Comments (0)

Files changed (1)

File jquery.progressive-btns.js

             var input_name = $inputs.eq(0).attr('name');
             var sender_attrs = {'type': 'hidden',
                                 'name': input_name };
-            
+            // The sender will be used to transmit the selected value with 
+            // the form on submit.
+            var $sender = null;
+
+            // Note that IE does not support changing input types via attr, so 
+            // we specify it in the initial node creation
             if(settings.debug){
                 // allows us to see the field for debugging
-                sender_attrs = $.extend(sender_attrs, 
-                                        {'type': 'text', 
-                                         'readonly': true});
+                $sender = $('<'+'input type="text" readonly="readonly"/>');
+            } else {
+                $sender = $('<'+'input type="hidden"/>');
             }
             
-            // The sender will be used to transmit the selected value with the form on submit
-            var $sender = $('<'+'input/>').attr(sender_attrs);
+            $sender.attr('name', input_name);
+            
+            
+            
             
             // clear the existing content and setup the hidden input
             $container.html($sender);