Message Box

  • Thread starter Thread starter Mariame
  • Start date Start date
M

Mariame

Hi Everyone

i want to appear a message box for users contains Yes or No
if the user choose yes it ll take action & if he choose nothing happen
i cant use the alert script coz i have to catch the value that the user
choose (yes or no)
is there a way can i make it appear in web like in windows application
(messagebox.show)??????

Thx in Advance
 
Mariame said:
Hi Everyone

i want to appear a message box for users contains Yes or No
if the user choose yes it ll take action & if he choose nothing happen
i cant use the alert script coz i have to catch the value that the user
choose (yes or no)
is there a way can i make it appear in web like in windows application
(messagebox.show)??????

Thx in Advance

if(confirm("Are you sure?"))
alert("OK, clicked");
else
alert("Cancel clicked");

--

//Rutger

DoDotNet@KICKTHIS_Gmail.com
www.RutgerSmit.com
 
if (confirm("message") // Shows OK and Cancel buttons
{
// OK Clicked
}
else
{
// Cancel clicked
}

Hi Everyone

i want to appear a message box for users contains Yes or No
if the user choose yes it ll take action & if he choose nothing happen
i cant use the alert script coz i have to catch the value that the user
choose (yes or no)
is there a way can i make it appear in web like in windows application
(messagebox.show)??????

Thx in Advance
 
Mariame,

I thought of something like this try I made (not complete)

Cor

\\\Needs a button, a panel and a label on a form to show
Private Sub Page_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Me.Panel1.Visible = False
Me.Panel1.Width = New Unit(300)
Me.Panel1.Height = New Unit(300)
Me.Panel1.Controls.Add(New LiteralControl("<BR><BR>"))
Me.Panel1.BorderStyle = BorderStyle.Double
Me.Panel1.BackColor = System.Drawing.Color.Gold
Dim TextLabel As New Label
Me.Button1.Text = "Click Me"
TextLabel.Text = "Push the button"
Dim OKButton As New Button
OKButton.Text = "OK"
OKButton.Width = New Unit(80)
OKButton.Height = New Unit(30)
Dim CancelButton As New Button
Panel1.Controls.Add(TextLabel)
AddHandler OKButton.Click, AddressOf OKbutton_Click
Me.Panel1.Controls.Add(New LiteralControl("<BR><BR>"))
Panel1.Controls.Add(OKButton)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Me.Panel1.Visible = True
Button1.Enabled = False
End Sub
Private Sub OKbutton_Click _
(ByVal sender As Object, ByVal e As System.EventArgs)
Me.Label1.Text = "The box was clicked"
Panel1.Visible = False
Button1.Enabled = True
End Sub
////
 
Here's some server side code that outputs javascript similar to what you are
requesting:
myDeleteButton.Attributes.Add("onclick", _
"return confirm('Are you sure you want to delete?');")

In this example, the Delete button will post back only if the person
confirms they want to delete. Otherwise your server code is never called in
response to the button click.
 
Back
Top