Hello,
I am new to html programmimg. I need help with displaying the div content in a modal dialog box or the showhelp window.
I need to have modal dialog box since I want user to respond to the information in the modal message.
Also inside the modal dialog box, I want to show a button for the user to close the modal dialog box.
So far I have the following code:
Inside the <head> section, I have:
<style type="text/css">
div {
position: absolute;
left: 100px;
top: 200px;
background-color: #f1f1f1;
width: 180px;
padding: 10px;
color: black;
border: #0000cc 2px Solid;
display: none;
}
</style>
In the <Script> section, I have:
Sub Help()
document.getElementById("Helpcontent").style.display = "inline"
End Sub
Sub HideHelp()
document.getElementById("Helpcontent").style.display = "none"
End Sub
Sub ShowModal()
window.showModalDialog("Helpcontent")
End Sub
The Help subroutine shows the help dialog box, but it is not a modal dialog box.
The ShowModal subroutine does not show the content of the
div content. It shows a blank html page as a modal dialog box.
In <body> section, I have:
<input type=button name="Show" value="Show Help" onclick="Help">
<DIV id="Helpcontent" STYLE="background-color:white;Height:210;Width:400;font:14pt arial;">
<CENTER>
<br><br>
A Sample HTA<br>
This is a help window screen<br><br><br>
<font size="2" face="Arial">Here will be the area that contains the help information</font>
<hr />
<input class="button" TYPE=BUTTON style="width:80;height:22" value="Close" name="btnHelp" onClick="HideHelp">
</CENTER>
</DIV>
Is it possible to have the ShowModal subroutine to show the div content?
Thanks.
CluM09
I am new to html programmimg. I need help with displaying the div content in a modal dialog box or the showhelp window.
I need to have modal dialog box since I want user to respond to the information in the modal message.
Also inside the modal dialog box, I want to show a button for the user to close the modal dialog box.
So far I have the following code:
Inside the <head> section, I have:
<style type="text/css">
div {
position: absolute;
left: 100px;
top: 200px;
background-color: #f1f1f1;
width: 180px;
padding: 10px;
color: black;
border: #0000cc 2px Solid;
display: none;
}
</style>
In the <Script> section, I have:
Sub Help()
document.getElementById("Helpcontent").style.display = "inline"
End Sub
Sub HideHelp()
document.getElementById("Helpcontent").style.display = "none"
End Sub
Sub ShowModal()
window.showModalDialog("Helpcontent")
End Sub
The Help subroutine shows the help dialog box, but it is not a modal dialog box.
The ShowModal subroutine does not show the content of the
div content. It shows a blank html page as a modal dialog box.
In <body> section, I have:
<input type=button name="Show" value="Show Help" onclick="Help">
<DIV id="Helpcontent" STYLE="background-color:white;Height:210;Width:400;font:14pt arial;">
<CENTER>
<br><br>
A Sample HTA<br>
This is a help window screen<br><br><br>
<font size="2" face="Arial">Here will be the area that contains the help information</font>
<hr />
<input class="button" TYPE=BUTTON style="width:80;height:22" value="Close" name="btnHelp" onClick="HideHelp">
</CENTER>
</DIV>
Is it possible to have the ShowModal subroutine to show the div content?
Thanks.
CluM09