By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,259 Members | 1,714 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,259 IT Pros & Developers. It's quick & easy.

modal-message

P: n/a
Hello.

I use script modal-message from

http://www.dhtmlgoodies.com/index.ht...=modal-message

It works good but i have one problem.

I want it show some html content. I set width and height for dialog.
But some times html content height is more then dialo height and in
this case content goes over dialog.

Example here:

http://gelembjuk.com/t/sc.jpg

How to force modal-dialog to be dynamic resizeble?
Aug 14 '08 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Try using this ... http://cylo.co.uk/modalDialog.html

Let me know if it works for you.

Graham
Aug 14 '08 #2

P: n/a
On Aug 14, 6:29*pm, Laser Lips <loudsphi...@gmail.comwrote:
Try using this ...http://cylo.co.uk/modalDialog.html

Let me know if it works for you.
It is excellent. But i can't use this script instead of modal-
message.js. Because it is built in live big live site.

Can you say what place of code in script you recommended is
responsible for height resizing? Is this some CSS option? Or it must
be jacascript code?
Aug 15 '08 #3

P: n/a
The documentation for the modal script your using says you can set the
width and height with setSize().

e.g. messageObj.setSize(500,300);

You you will need to work out how big your content is going to be.

If you know how big your conent is each time you open a dialog then
thast ok, but if you don't, youll have to work it out with code.
If I need to know how big a div is going to be before I put it on the
page what I do is build up the html in javascript, add it to the page
using document.appenChild(), get it's offsetWidtha and height, then
remove it again. Then I can use this width and height for other
computations, which in your case would be to open the dialog.

Good luck.
http://cylo.co.uk
Aug 18 '08 #4

P: n/a
On 18 ΑΧΗ, 13:01, Laser Lips <loudsphi...@gmail.comwrote:
If you know how big your conent is each time you open a dialog then
thast ok, but if you don't, youll have to work it out with code.
If I need to know how big a div is going to be before I put it on the
page what I do is build up the html in javascript, add it to the page
using document.appenChild(), get it's offsetWidtha and height, then
remove it again. šThen I can use this width and height for other
computations, which in your case would be to open the dialog.
Thanks.
I used document.appenChild() and offsetHeight and it works.
The only thing that is strainge offsetHeight returns number that is
less then real size. I must to append 10% of that number to get
correct data.

Sep 12 '08 #5

P: n/a
Gelembjuk wrote:
I used document.appenChild() and offsetHeight and it works.
The only thing that is strainge offsetHeight returns number that is
less then real size. I must to append 10% of that number to get
correct data.
Works as designed. See e.g. the `offsetHeight' property definition in the
MSDN Library. You may also want to make sure that your document is not
rendered in Quirks/Compatibility Mode.
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Sep 13 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.