Pop on clicking a button

A

Anita C

Hi,
I have different buttons on a webform, what code should I add to the click
events of these buttons so that on clicking these 'Info' button's a
description pops up, this pop up should have a close button, which the user
can use.
Thanks a lot
 
A

Alvin Bruney

button1.attributes["onclick"] = "Response.write(<script>alert('some
text')</script>';
or use a literal control page.controls.add(new
literalcontrol("<script>alert....
 
K

Ken Cox [Microsoft MVP]

How about the createPopup Method ?

http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/createpopup.asp


<HTML>
<HEAD>
<TITLE>Popup Example</TITLE>

<SCRIPT LANGUAGE="JScript">
var oPopup = window.createPopup();
function ButtonClick()
{
var oPopBody = oPopup.document.body;
oPopBody.style.backgroundColor = "lightyellow";
oPopBody.style.border = "solid black 1px";
oPopBody.innerHTML = "Click outside <B>popup</B> to close.";
oPopup.show(100, 100, 180, 25, document.body);
}
</SCRIPT>
</HEAD>


--
Microsoft MVPs have a question for *you*: Are you patched against the Worm?
http://www.microsoft.com/security/security_bulletins/ms03-026.asp



Hi,
I have different buttons on a webform, what code should I add to the click
events of these buttons so that on clicking these 'Info' button's a
description pops up, this pop up should have a close button, which the user
can use.
Thanks a lot
 

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
474,263
Messages
2,571,064
Members
48,769
Latest member
Clifft

Latest Threads

Top