cross browser - jQuery awkward behaviour -


I am trying to load the whole page on the whole page, and finds it in a loaded one like mine Used to be. Some of a practical practice.

The result of the AJAX call is a string in which the page is html.

To make it simple, I gave an example string containing something of a page.

  & lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Some tests & lt; / Title & gt; & Lt; Style type = "text / css" & gt; .dv810 {height: 810px; } & Lt; / Style & gt; & Lt; Script src = "scripts / references / jquery.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Spage = + '& lt ;! DOCTYPE html public "- // W3C // DTD XHTML 1.0 Transitional // N" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> '+' \ N & lt; Html xmlns = "http://www.w3.org/1999/xhtml" & gt; + '\ N & lt; Principal & gt; + '\ N & lt; Title & gt; Some tests & lt; / Title> + '\ N & lt; Style type = "text / css" & gt; + '\ N' + '\ n #dv main {height: 830px; } '+' \ N '+' \ n & lt; / Style & gt; '+' \ N & lt; / Head & gt; + '\ N & lt; Body & gt; + '\ N & lt; Div class = "container_12 main container" & gt; + '\ N & lt; Div id = "dmman" class = "dv810" & gt; & Lt; / Div> + '\ N & lt; Br / & gt; + '\ N & lt; / Div> + '\ N & lt; / Body & gt; ' + '\ N & lt; / Html & gt; '; Warning ('# DVD:' + $ ('# DVD', $ (Aspage)). CSS ('height')); & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

I found this strange behavior while trying to drag a CSS property:

  • Firefox: # dv14ain.height: 810px
  • Chrome: # dvMain.height:
  • IE8: # dvMain.height: 830px
  • IE8 (with IEtester): # dvMain.height: 830px
  • ( IE7 (with IEtester): # dvMain.height: 830px
  • IE6 (with IEtester): # dvMain.height: 830px

It looks like:

  • IE understands CSS in string, hell knows how (though it's a weird behavior, I like it a little bit, though I think That I will not use it),
  • Firefox behaves like I think it would be right, the page rendered from the rendered page gets,
  • for my surprise Chrome, do not understand or it is not related, uh, .. okay, just do not show anything? Does anyone know?
  • Looking at your various results, I suppose I'm worried about the dome processing time Dying code such that the result is different from Amin:

      var $ sPage = $ (spage); Alert ('#divman:' + $ ('# dw man', $ s page). Css ('height'));  

    OR

      $ (spage) .ready (function () {warning ('# dvMain:' + $ ('# dvMain', $ ( SPAG)) CSS ('height')););  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -