Lately I’ve had a few users indicate they’ve had errors in Impromptu only with IE. I finally was able to replicate this error. The error indicates that its on line 89:
jqi.css({ position: “absolute”, top: “100px”, left: “50%”, marginLeft: ((((jqi.css(”paddingLeft”).split(”px”)[0]*1) + jqi.width())/2)*-1) });
I had been using Impromptu all week and it had been working fine in all browsers. Then I finally received this error I’ve heard so much about. The problem ended up being in the html I passed when invoking the prompt.
$.prompt('<p>this had broken html</p>');
With the html passed in broken jQuery in IE was unable to figure out the proper html and thus could not apply the styling to it. I hope this helps the users out who were having trouble!
Related posts:


9 Responses
Gaby
05|Nov|2008I had the same problem … and what was causing the error was a bad label formed from html
dionisis
06|Nov|2008Hi, i like your widget very much and here is a css i created, inspired by ext.js alert box.
.customwarning .custom{ border:1px red solid; }
.customfade{
position: absolute;
background-color: #ffffff;
}
div.custom
{
border:1px #6289B6 solid;
position: absolute;
background-color: #CAD8EA;
padding: 0;
width: 300px;
text-align: left;
}
div.custom .customclose{
background-color: #CAD8EA;
margin:2px -2px 0 0;
cursor: pointer;
color: red;
text-align: right;
}
div.custom .customcontainer{
background-color: #CAD8EA;
padding: 0 5px 5px 5px;
color: #000000;
font:normal 11px Verdana;
}
div.custom .custommessage{
background-color: #CAD8EA;
padding: 0;
margin:0 15px 15px 15px;
}
div.custom .custombuttons{
text-align: center;
padding: 0px 0 0 0;
}
div.custom button{
padding: 1px 4px;
margin: 0 10px;
background-color:#cccccc;
font-weight:normal;
font-family:Verdana;
font-size:10px;
}
However , i have a tiny problem.
I use impromptu on an aspx page, which has a DropDownList control. The opacity of improptu is set to 0 and when fired the DropDownList control disappears. Have ever seen that before? If no any thoughts?
Thanks & regards
dionisis
06|Nov|2008I found the solution:
set the element’s visibility to ‘visible’
just before the impromptu box appears.
I put this code in your js file at the bottom.
As you see the error occurs only in IE
—-code—– if(navigator.appName!==’Netscape’)
{document.getElementById(‘DropDownElementID’).style.visibility=’visible’;}
jqif.fadeIn(o.overlayspeed);
jqi[o.show](o.promptspeed,o.loaded);
jqi.find(‘#’+ o.prefix +’buttons button:eq(‘+ o.focus +’)').focus();//focus the default button
return jqib;
trent
06|Nov|2008Thanks for the css and solution. If you don’t mind I will add this to the documentation page for samples of themes?
dionisis
07|Nov|2008no, i don’t mind. I think this solution can be very heplful because a lot of people have seen the error. I found a lot of requests when googling but no solution.
Regards
James
24|Nov|2008Beginner note: copying the above code requires you to change all quotes from ââ to ” and of course specify the DropDownElementID.
This would probably work better for all drop downs:
$(‘select’).css(‘visibility’,'visible’);
–
I have a similar issue with disappearing drop downs on prompt that reappear on prompt close. @dionisis’ solution unfortunately does not help me.
I have a fairly large form with a few drop downs. This solution actually shows the drop down in front of the prompt rather than behind it and it also makes it editable which I do not want until the blockUI is released. I tried messing around with z-index/Zindex to no avail.
I am not sure how familiar either of you are with blockUI or how relevant it is here – sorry for cross posting – but making the select visible at any point counters the transparency effect applied to the page behind the prompt.
In fact, both impromptu 1.5 [3/31/2008] and blockUI 2.08 [06/11/2008] have drop down display issues. In between calls, drop downs flicker to visible and then invisible again — in IE6.
Is anyone aware of a fix for this, I know selects are tricky in IE6 but there has to be a better solution?
Trent – this is my first post here, you do great work keep it up. If I find a solution I will post it here.
trent
24|Nov|2008Sorry, I did not catch the problem the first time.. It never clicked in my mind that DropDownList is a select, and I also just noticed the documentation doesn’t include an option which I added a few versions ago to cure this. The solution to the select tags bleeding through is an iframe. There is an option to useiframe with impromptu. If you rather not do this on ever invocation, set it as a default:
$.SetImpromptuDefaults({
useiframe: true
});
or you can call with the regular
$.prompt(‘hello’,{ useiframe: true });
Impromptu will only use the iframe within ie6 overlaying selects, firefox, safari, and opera will see no change.
James
24|Nov|2008trent – Thanks for your quick response.
I tried setting the defaults to useiframe before my post but gave up because the iframe rendered as an error: ‘The Page Cannot Be Displayed’ – typical windows not found error.
I’ve changed the msgbox html from src=”javascript:;” to src=”#” resolved that for me at least… But it still does not show any of the dropdown/selects at all and I’ve commented out the following to be sure:
//if(ie6) $(‘select’).css(‘visibility’,'hidden’);
While also forcing visible as @dionisis did after //Show it.
The drop downs appear briefly at -full opacity- when you scroll, but that is all.
It’s been a long day, I am going to start from scratch tomorrow to be sure I haven’t screwed something up.
How familiar are you with blockUI? I’ve been trying to find a smooth opacity transition between plug-ins, haven’t found the magic touch yet. Trying to find a gradual fade rather then a half-sec flicker.
Let it also be known that working with IE6 is not a preference of mine — grrrrr.
ClubPenguinCheats
18|Jun|2010In fact, both impromptu 1.5 [3/31/2008] and blockUI 2.08 [06/11/2008] have drop down display issues. In between calls, drop downs flicker to visible and then invisible again — in IE6.