View Full Version : Messagebox/Dialog trouble

8 Apr 2007, 7:06 AM
Hey guys,

I used the code of the examples page to create:

{click the little screenshots half way down}

I changed the height/width of the dialogs in the code, but for some reason, it doesn't update it untill you close the dialog and click the screenshot another time. Depending on browser and browser cache, though.

Any thoughts on how to solve this?
It's probably something really dumb... but I can't figure it out...

Thanks guys!

8 Apr 2007, 9:36 AM
This is not a bug, there are no width and height attributes for a MessageBox.

Try putting the dimensions on the img instead. The problem is on the first show the image has not loaded and therefore has no dimensions (the browser gets the dimensions when the image is loaded, which occurs after the messagebox has calculated). On subsequent shows it works as expected because the image is cached and the browser can set the size of the image immediately instead of having to wait for it to load.

8 Apr 2007, 11:18 PM
Yupz, you're right! Works like a charm!
YOU ROCK, you know that!? Well now you do ;-) !
Thanks man!