0 valutazioniIl 0% ha trovato utile questo documento (0 voti)
7K visualizzazioni1 pagina
The document discusses several issues with using jQuery events in the IE7 browser and provides solutions:
1) When using $.trim() in IE7, the value must be assigned to a variable before trimming rather than trimming the value directly.
2) When adding a class in IE7 with addClass(), the class name value must be a string or empty string, not undefined, or it will cause errors.
3) Grid content rendered as span tags in IE7, so events and classes need to be applied to span rather than grid for IE7.
The document discusses several issues with using jQuery events in the IE7 browser and provides solutions:
1) When using $.trim() in IE7, the value must be assigned to a variable before trimming rather than trimming the value directly.
2) When adding a class in IE7 with addClass(), the class name value must be a string or empty string, not undefined, or it will cause errors.
3) Grid content rendered as span tags in IE7, so events and classes need to be applied to span rather than grid for IE7.
The document discusses several issues with using jQuery events in the IE7 browser and provides solutions:
1) When using $.trim() in IE7, the value must be assigned to a variable before trimming rather than trimming the value directly.
2) When adding a class in IE7 with addClass(), the class name value must be a string or empty string, not undefined, or it will cause errors.
3) Grid content rendered as span tags in IE7, so events and classes need to be applied to span rather than grid for IE7.
Solution that did NOT work in IE7: $('#keywords').val().trim(); Solution that works in IE7: var searchTerm = $('#keywords').val(); searchTerm = $.trim(searchTerm); 2) $('Selector').addClass(ClassName) The value of the Class Name must be a value or . It should not the undefined value & if it is undefined the further code in IE7 doesnt executes, causing unloading of file itself. 3) Grid content for IE7 Grid content is rendered in span tag for IE7. If any event or class needs to be applied on grid content then, it has to apply on span tag for IE7 browser. 4) Syntax Error IE7 browser does not load the files having syntax errors. "multiplicity" : { "self" : "one", "other" : "many", "otherTextField" : "Name", "isGenericList" : true, "otherValueField" : "BuildingId", "otherSource" : "list", -- The comma here would throw an error when running on IE7 } 5) Avoid use of jQuery(*) ie all selector The all or universal, selector is extremely slow & many a times causing timeouts on IE7 e.g. In cmc.viewform.js, at line no. 434 we had a line of code $("*", $target).remove(); which was replaced by $($target).empty(); 6) Avoid dynamic addition of any in-line event in any HTML tag. e.g. onClick() event for anchor tag.