INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Popup message

Popup message

(OP)
Hello to all,

i hope someone can help me.

I am using Java 1.6 and Tomcat 6.
I have a jsp file where i call a method like this:

CODE --> java
<tr><td align="center" valign="top" colspan="2">
<br>
<table border="0" cellpadding="20" cellspacing="0" ><tr><td valign="top">
<table border="0" cellpadding="0" cellspacing="0" > <tr align="center"><td>
<%
class.method(parameter)
%>
</td>
</tr>
</table>
</td></tr></table>
</td></tr>
The methode is like this:

CODE --> java
public String blabla (...)
Stringbuffer output = new StringBuffer();
...
output.append("bla bla");
... this methode returns a "Systemmessage" window with text "bla bla".

Now i would like to replase this "Systemmessage" whith a "bla bla" text in a popup window with a OK Button...

Can someone give me an advice? is this something i had to change it on the jsp file, or should i make changes in the method?

Thanks

Theo

RE: Popup message

Not sure if I understand the question. Maybe what you need is just a Confirm box

Cheers,
Dian

RE: Popup message

(OP)
Something like this yes. Just i need that, the message for this "alert" Box, should be the retourn of a method.. So is it possiple to run alert like.

CODE --> java

alert("<% testbean.result(param1,param2,param3) %>) 
????????

RE: Popup message

(OP)
Wonderfull! It works!. I just need one last detail:
The retourn of testbean.result is a String-"Message" which i would like to have on the alert Window.

If i type

CODE --> java

alert("<%=testbean.result(param1,param2,param3) %>) 
this runs the methode, but i get not the "return".
If i add a output.println, before testbean.result, i get an error message:
"output cannot be resolved"

any ideas?
Theo

RE: Popup message

What does that method return?

Cheers,
Dian

RE: Popup message

(OP)

CODE --> java

.....
StringBuffer output = new StringBuffer();
...
output.append("bla bla")
..
String result= output.toString();
retourn result; 

RE: Popup message

CODE

alert("<%=testbean.result(param1,param2,param3);%>") 

Cheers,
Dian

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close