help with modal dialog
Posted:
Sat Mar 24, 2007 9:34 pm
by vivendi
Hello, i want to use the modal dialog box, like on this demo:
http://www.dhtmlgoodies.com/scripts/mod ... ssage.html
I want to use the static (example 1) dialog.
But i cant get it to work. If i look in the source i see a few .js files and a css files and a few <script> tags. What do i need from the source for just the static dialog box??
Thanks for any help.
Posted:
Sat Mar 24, 2007 9:50 pm
by Calcifer
<script type="text/javascript" src="../js/separateFiles/dhtmlSuite-common.js"></script>
<script type="text/javascript">
DHTMLSuite.include("modalMessage");
function displayStaticMessage(messageContent,cssClass)
{
messageObj.setHtmlContent(messageContent);
messageObj.setSize(300,150);
messageObj.setCssClassMessageBox(cssClass);
messageObj.setShadowDivVisible(false); // Disable shadow for these boxes
messageObj.display();
}
function closeMessage()
{
messageObj.close();
}
</script>
<a href="#" onclick="displayStaticMessage('<h1>Static message</h1><p>This is a static message</p><p><a href=\'#\' onclick=\'closeMessage();return false\'>Close</a>',false);return false">Static message (Example 1)</a><br>
Posted:
Sat Mar 24, 2007 10:24 pm
by vivendi
I couldn't find the .js file that you have in your code so i used these two:
<script type="text/javascript" src="js/ajax-dynamic-content.js"></script>
<script type="text/javascript" src="js/modal-message.js"></script>
But when i try your code i get the following error:
'messageObj' is undefined.
Any idea what im doing wrong??
Posted:
Sat Mar 24, 2007 10:34 pm
by Calcifer
where is your file? in demos directory?
Posted:
Sun Mar 25, 2007 12:08 am
by vivendi
Thanks its working now, i needed the css file too