.NETGURU
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, Dot Net Guruhew
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?');
}

Dot Net Guru

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




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification