Author: jablko
Date: Mon Oct 26 09:41:26 2009
New Revision: 3836

Log:
Internet Explorer doesn't support standard contentDocument attribute, 
http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-50708718

Modified:
   trunk/web/js/autocomplete.js

Modified: trunk/web/js/autocomplete.js
==============================================================================
--- trunk/web/js/autocomplete.js        Mon Oct 26 09:37:53 2009        (r3835)
+++ trunk/web/js/autocomplete.js        Mon Oct 26 09:41:26 2009        (r3836)
@@ -314,7 +314,7 @@
                   $(iframe).one('load', function ()
                     {
                       // Update value of this input with URI of new resource
-                      $(hidden).val(this.contentDocument.location);
+                      $(hidden).val(this.contentWindow.document.location);
 
                       // Decrement count of listeners and submit if all done
                       done();
@@ -323,7 +323,7 @@
                   // Apply selector to <iframe> contents, update value of
                   // selected element with value of the autocomplete <input>,
                   // and submit selected element's form
-                  $($(components[1], 
iframe.contentDocument).val($(input).val())[0].form).submit();
+                  $($(components[1], 
iframe.contentWindow.document).val($(input).val())[0].form).submit();
                 }
 
                 // Selecting existing item cancels addition of a new choice
@@ -369,7 +369,7 @@
                             {
                               // Make <input> with URI of new resource as its
                               // value
-                              $('<input name="' + $(select).attr('name') + '" 
type="hidden" value="' + this.contentDocument.location + '"/>').appendTo(li);
+                              $('<input name="' + $(select).attr('name') + '" 
type="hidden" value="' + this.contentWindow.document.location + 
'"/>').appendTo(li);
 
                               // Decrement count of listeners and submit if all
                               // done
@@ -379,7 +379,7 @@
                           // Apply selector to <iframe> contents, update value
                           // of selected element with text of the new choice,
                           // and submit selected element's form
-                          $($(components[1], 
iframe.contentDocument).val($(clone).val())[0].form).submit();
+                          $($(components[1], 
iframe.contentWindow.document).val($(clone).val())[0].form).submit();
                         }
 
                         // Make <li>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to