modal-message

G

Gelembjuk

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?
 
L

Laser Lips

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
 
G

Gelembjuk

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top