开发者

Jquery Text is not visible in IE 7.0

开发者 https://www.devze.com 2022-12-20 00:35 出处:网络
The text is not getting displayed on my modal window. I do see a blank space but when i highlight it with mouse i see the text and when i click anywhere on the screen the text becomes invisible. It wo

The text is not getting displayed on my modal window. I do see a blank space but when i highlight it with mouse i see the text and when i click anywhere on the screen the text becomes invisible. It works in firefox, IE 6.0 and IE 8.0 but not in IE 7.0. Any suggestion is highly appreciated. Below is the code:

var msg = "This is a test error message";

showError(errormessage);

UTILS.showError = function(error) {

if(error === null || error === undefined) {
    return;
}

error = UTILS.Verror(error);

$("#validatorErrorDialog").remove();
$("#errorDialog").remove();
$("#warningDialog").remove();
$('div.confirmation').parent().hide();

var errorClone = $("#validatorErrorDialogHidden").clone();
errorClone.attr("id", "validatorErrorDialog");

var itemError = errorClone.find("ul.items li");
var itemErrorClone = itemError.clone开发者_JAVA百科();
var msgs = error.split("\n");
for(var i in msgs) {
    if (i == 0) {
        itemError.html(msgs[i]);
    } else {

        itemError.after(itemErrorClone.clone().html(unescape(msgs[i])));

    }
}
errorClone.removeClass("hidden");
if (UTILS.showError.arguments.length > 1) {
    var modalWindowId = UTILS.showError.arguments[1];
    $(".windowBodyBox .clear:eq(2)", modalWindowId).after(errorClone);
} else {
    if($('#openedModalId').length > 0 && $('#openedModalId').val() !== '') {
            var modalWindowId = $('#openedModalId').val();
            errorClone.prependTo($(modalWindowId +" div.line").next());


    } else {
            var index = $("#pageBodyIndex").val();
            if (index === undefined || index < 0 || index =='' || index =='') {
                index = 0;
            }
        errorClone.prependTo("div.pageBlockBody:eq("+index+")");
    }

}
// tooltips
$("#validatorErrorDialog").find(".tooltip").tooltip({
    track: true,
    delay: 0,
    fixPNG: true,
    opacity: 0.95,
    showURL: false
});

};

UTILS.Verror = function(errorMessage) { var patt1=new RegExp("{#[A-Za-z][A-Za-z0-9.:-_]*}", "g"); do { m =patt1.exec(errorMessage); if(m!=null && m!= undefined) { s =''+m; s = s.substring(1,s.length-1); errorMessage=errorMessage.replace(''+m,$(s).val()); } } while(m!=null && m!= undefined) { return errorMessage; } }


Not much to go on without some sample code, but some ideas:

  • Check your DOCTYPE--put <!doctype html> at the start of your html and see how it changes the behavior
  • In IE8, press F12 to bring up developer tools and go to IE7 standards and quirks mode and see if the behavior replicates--this will let you know if you're running into a "quirks mode" issue in IE7
  • Possible race condition in JQuery animations or z-indexes, change the delays on some of your JQuery animations and see how it works
  • Ensure you are using the latest JQuery 1.4

Finally, it might be a good idea to avoid using modal windows, depending on the application. They're really annoying (for the most part), but only you know the use case here.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号