views:

53

answers:

1

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();
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; } }

+1  A: 

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.

Plynx
Now that you've added some code I'd love to give more detailed help--but I'll probably need the related HTML/CSS too. do you have this up on a site somewhere I can check out?
Plynx