Search:
Namespaces
Discussions
.NET v1.1
Feedback
How do create a MsgBox?
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspngclient' list
.
Administrator
-- Moved from [aspngfreeforall] to [aspngclient] by Let the good times roll <
Click here to reveal e-mail address
> --
Hello All,
Question of the day (night, or whatever time period it is in your part of the world): How do you create a MsgBox in a web age? Either as a notification, or as a confirmation of an event. (i.e. "Are you sure you want to do this?" Yes/No)
Thanks,
John
Holder of a million questions
Reply to this message...
Peter Brunone
John,
For notification, use
alert("whatever text you want including appended variables");
For confirmation, use
if(confirm("Are you sure?")) {
Do whatever they confirmed here;
}
Regards,
Peter
----- Original Message -----
From: "Administrator" <
Click here to reveal e-mail address
>
[Original message clipped]
notification, or as a confirmation of an event. (i.e. "Are you sure you
want to do this?" Yes/No)
[Original message clipped]
Reply to this message...
Andy Smith
If you wanna attach confirmation to a button, then I have a library that =
encapsulates that very nicely.
example:
http://www.metabuilders.com/Tools/ConfirmedButtons.aspx
download:
http://www.metabuilders.com/Tools/ConfirmedButtons.zip
__
Andy Smith
Keyboard Jockey #3a7-2.78.1
[Original message clipped]
Reply to this message...
Administrator
Problem Solved:
CodeBehind =3D=20
Public AlertCode as String
Sub Whatever(ByVal Sender as Object, e as EventArgs)
... Sub Code ...
AlertCode =3D "alert(" & Chr(34) & Stuff manipulated here & Chr(34) & =
")"
End Sub
Web Page =3D
<script language=3D"javascript">
<%=3DAlertCode%>
</script>
'To keep the msgbox from apearing on reload
<%AlertCode =3D ""%>
Just thought I would share.
John
-----Original Message-----
From: Administrator=20
Sent: Sunday, July 28, 2002 9:57 PM
To: aspngclient
Subject: [aspngclient] How do create a MsgBox?
-- Moved from [aspngfreeforall] to [aspngclient] by Let the good times =
roll <
Click here to reveal e-mail address
> --
Hello All,
Question of the day (night, or whatever time period it is in your part =
of the world): How do you create a MsgBox in a web age? Either as a =
notification, or as a confirmation of an event. (i.e. "Are you sure you =
want to do this?" Yes/No)
Thanks,
John
Holder of a million questions
| [aspngclient] member
Click here to reveal e-mail address
=3D YOUR ID
|
http://www.aspfriends.com/aspfriends/aspngclient.asp
=3D JOIN/QUIT
Reply to this message...
Moore, Matthew
I'm not sure if it's a client function, but you can do it with javascript. Here are two different ways I do it. If I have a button on an .aspx page, I add an attribute to the button with my codebehind.
Delete.Attributes.Add("OnClick", "return confirm('Are you Sure you want to Delete?');");
If I want to put it in a javascript function, I do it like this.
Function lame()
{
return confirm('Do you want to confirm this?');
}
Matt
-----Original Message-----
From: Administrator [mailto:
Click here to reveal e-mail address
]
Sent: Monday, July 29, 2002 12:57 AM
To: aspngclient
Subject: [aspngclient] How do create a MsgBox?
-- Moved from [aspngfreeforall] to [aspngclient] by Let the good times roll <
Click here to reveal e-mail address
> --
Hello All,
Question of the day (night, or whatever time period it is in your part of the world): How do you create a MsgBox in a web age? Either as a notification, or as a confirmation of an event. (i.e. "Are you sure you want to do this?" Yes/No)
Thanks,
John
Reply to this message...
System.EventArgs
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com