MessageBox  
Author Message
Rick





PostPosted: 2003-11-6 19:55:00 Top

java-programmer, MessageBox Hi,

Call me stupid but where can I find the messagebox in Java?? Or do I have to
create one myself? What I need is a simple function just like Alert( "I'm
annoying!" ); in JavaScript.

Greetings,
Rick


 
mjohnson_7





PostPosted: 2003-11-6 23:00:00 Top

java-programmer >> MessageBox "Rick" <email***@***.com> wrote in message news:<3faa3645$0$58710$email***@***.com>...
> Hi,
>
> Call me stupid but where can I find the messagebox in Java?? Or do I have to
> create one myself? What I need is a simple function just like Alert( "I'm
> annoying!" ); in JavaScript.
>
> Greetings,
> Rick

Take a look at the JOptionPane class. I have used this to display messages.

MJ
 
Rick





PostPosted: 2003-11-6 23:56:00 Top

java-programmer >> MessageBox Thanks, that was exactly what I needed!

Greetings,
Rick


 
 
Johan





PostPosted: 2004-2-12 2:22:00 Top

java-programmer >> MessageBox Hello,

Where can I find message box class for java ?

regards

John


 
 
Andrew Thompson





PostPosted: 2004-2-12 2:28:00 Top

java-programmer >> MessageBox Johan wrote:
..
> Where can I find message box class for java ?

Do you mean a pop-up message?

AWT - Dialog.
Swing - JDialog, JOptionPane.


 
 
Chris Smith





PostPosted: 2004-2-12 2:32:00 Top

java-programmer >> MessageBox Johan wrote:
> Where can I find message box class for java ?
>

In Swing, try JOptionPane. It has static methods to do convenient and
simple messages. For AWT, unfortunately, you have to write your own.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
 
Globus





PostPosted: 2004-2-12 6:32:00 Top

java-programmer >> MessageBox
http://java.sun.com/developer/JDCTechTips/2004/tt0122.html
 
 
Rodrigo Ferreira





PostPosted: 2005-12-23 0:47:00 Top

java-programmer >> MessageBox How can i do a simple OK/CANCEL MessageBox in C#???

Greetings,

Rodrigo Ferreira


 
 
Tod Birdsall, MCSD for .NET





PostPosted: 2005-12-23 0:56:00 Top

java-programmer >> MessageBox Hi Rodrigo,

Check out the following thread for help with this:

http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/65d86328c8785437/ac96186f1abf2dd0?q=ok+cancel&rnum=1#ac96186f1abf2dd0

--
Tod Birdsall, MCSD for .Net
blog: http://tod1d.blogspot.com

 
 
Rodrigo Ferreira





PostPosted: 2006-1-20 22:13:00 Top

java-programmer >> MessageBox Hello,

Anyone knows how to use a MessageBox into a asp.net project using C#?

MessageBox.Shows() doesn't exists!

Greetings,

Rodrigo Ferreira


 
 
Joey





PostPosted: 2006-1-20 22:21:00 Top

java-programmer >> MessageBox You must use a scripting language such as javascript to do this on the
client side. You can register the script from your code behind pages...

this.Page.RegisterClientScriptBlock("ShowMessageBox","<script
language='javascript'>window.alert('This is a message
box!')</script>");

...or...

this.Page.RegisterStartupScript("ShowMessageBox","<script
language='javascript'>window.alert('This is a message
box!')</script>");

...or...

you can plant the script directly in the aspx page.

I sure there are many other options as well...

 
 
Steve C. Orr [MVP, MCSD]





PostPosted: 2006-1-21 1:14:00 Top

java-programmer >> MessageBox Yes, here's a free MessageBox control I wrote in C# with the source code
included:
http://SteveOrr.net/articles/ClientSideSuite.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net


"Rodrigo Ferreira" <email***@***.com> wrote in message
news:%email***@***.com...
> Hello,
>
> Anyone knows how to use a MessageBox into a asp.net project using C#?
>
> MessageBox.Shows() doesn't exists!
>
> Greetings,
>
> Rodrigo Ferreira
>


 
 
meena.sekaran





PostPosted: 2006-3-21 20:36:00 Top

java-programmer >> MessageBox hi all
can anyone help me to create a Jmessagbox in swing that has ok
button.prog plzzz.

 
 
derek





PostPosted: 2006-3-21 20:45:00 Top

java-programmer >> MessageBox > can anyone help me to create a Jmessagbox in swing
> that has ok button.prog plzzz.

JOptionPane.showMessageDialog(null, "message",
"header", JOptionPane.INFORMATION_MESSAGE);
 
 
mac





PostPosted: 2006-6-22 13:32:00 Top

java-programmer >> MessageBox
Hi!

I've created a simple ASPX form that displays a record from a SQL Server
table. I have a "Delete" button on the form. When the user clicks it,
I want to prompt the user with
a message ("Are you sure you want to delete... ?").

I realize the Yes/No Messagebox can be done via Javascript -- but how do
I retrieve the Messagebox return value in my .ASPX page?
so I can act on it (i.e., to perform the delete)?


Thanks in Advance
Mac


 
 
Mark Rae





PostPosted: 2006-6-22 14:11:00 Top

java-programmer >> MessageBox "mac" <email***@***.com> wrote in message
news:email***@***.com...

> I realize the Yes/No Messagebox can be done via Javascript -- but how do
> I retrieve the Messagebox return value in my .ASPX page?
> so I can act on it (i.e., to perform the delete)?

return confirm('Are you sure you want to delete this record?');


 
 
ValliM





PostPosted: 2006-6-22 14:25:00 Top

java-programmer >> MessageBox Hi Mac,

You can add the confirmation messagebox in aspx page as shown below.
You have to wirte the following code on the page load event , which adds an
onclick event to the asp.net button to
display a message box. When u click ok it will proceed to the delete
operation.
protected void Page_Load(object sender, EventArgs e)

{

bnDelete.Attributes.Add("onclick",

"return(confirm('Are you sure to delete?'));");

}

Regards,

Valli

(www.syncfusion.com)

ASP.Net FAQ:
http://www.syncfusion.com/faq/aspnet/default.aspx

Complete set of ASP.Net controls and components
http://www.syncfusion.com/toolsweb


"mac" <email***@***.com> wrote in message
news:email***@***.com...
>
> Hi!
>
> I've created a simple ASPX form that displays a record from a SQL Server
> table. I have a "Delete" button on the form. When the user clicks it,
> I want to prompt the user with
> a message ("Are you sure you want to delete... ?").
>
> I realize the Yes/No Messagebox can be done via Javascript -- but how do
> I retrieve the Messagebox return value in my .ASPX page?
> so I can act on it (i.e., to perform the delete)?
>
>
> Thanks in Advance
> Mac
>
>


 
 
Ray Booysen





PostPosted: 2006-6-22 16:05:00 Top

java-programmer >> MessageBox Well, thats a bit vague. If the user clicks no/cancel, the form isn't
POSTed to the server so nothing changes. If the users clicks yes/ok,
then the form is POSTed back.

You can then assume that if the form is POSTed then the user clicked the
yes/ok button. If the user has javascript disabled, obviously you
cannot determine this.

Regards
Ray

ValliM wrote:
> Hi Mac,
>
> You can add the confirmation messagebox in aspx page as shown below.
> You have to wirte the following code on the page load event , which adds an
> onclick event to the asp.net button to
> display a message box. When u click ok it will proceed to the delete
> operation.
> protected void Page_Load(object sender, EventArgs e)
>
> {
>
> bnDelete.Attributes.Add("onclick",
>
> "return(confirm('Are you sure to delete?'));");
>
> }
>
> Regards,
>
> Valli
>
> (www.syncfusion.com)
>
> ASP.Net FAQ:
> http://www.syncfusion.com/faq/aspnet/default.aspx
>
> Complete set of ASP.Net controls and components
> http://www.syncfusion.com/toolsweb
>
>
> "mac" <email***@***.com> wrote in message
> news:email***@***.com...
>> Hi!
>>
>> I've created a simple ASPX form that displays a record from a SQL Server
>> table. I have a "Delete" button on the form. When the user clicks it,
>> I want to prompt the user with
>> a message ("Are you sure you want to delete... ?").
>>
>> I realize the Yes/No Messagebox can be done via Javascript -- but how do
>> I retrieve the Messagebox return value in my .ASPX page?
>> so I can act on it (i.e., to perform the delete)?
>>
>>
>> Thanks in Advance
>> Mac
>>
>>
>
>
 
 
Steve C. Orr [MVP, MCSD]





PostPosted: 2006-6-22 22:44:00 Top

java-programmer >> MessageBox Here's some server side code that uses javascript to display a confirmation
message.

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 the server code is never called in
response to the button click.

Here's more info:
http://SteveOrr.net/articles/ClientSideSuite.aspx


"mac" <email***@***.com> wrote in message
news:email***@***.com...
>
> Hi!
>
> I've created a simple ASPX form that displays a record from a SQL Server
> table. I have a "Delete" button on the form. When the user clicks it,
> I want to prompt the user with
> a message ("Are you sure you want to delete... ?").
>
> I realize the Yes/No Messagebox can be done via Javascript -- but how do
> I retrieve the Messagebox return value in my .ASPX page?
> so I can act on it (i.e., to perform the delete)?
>
>
> Thanks in Advance
> Mac
>
>


 
 
John Baima





PostPosted: 2006-9-8 19:56:00 Top

java-programmer >> MessageBox When I run my ASP.NET app in the debugger,
System.Windows.Forms.MessageBox.Show works when running on the server.
It does not work when I actually upload my web site to the web server.
That is really annoying! I wish it would not work in the debugger!
Things should not work differently like that.

Anyway, I am looking for alternatives. I can do something like:

Response.Write("<script>alert('hello');</script>");

from the server side, but I cannot specify the title, and there is no
return value. Yes/No MessageBoxes are useful! Is there any better
option? I really would like something that can be launched from the
server side that displays some text and can post back some kind of
result. Is that possible?

BTW, I don't think that I've seen a mention of the ASP.NET faq at:

http://www.syncfusion.com/faq/aspnet/default.aspx

That really is a useful document.

-John