Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Popup message 1

Status
Not open for further replies.

theo67

Technical User
Jul 17, 2008
31
0
0
DE
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
 
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.
Java:
alert("<% testbean.result(param1,param2,param3) %>)
????????

 
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
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
 
Java:
.....
StringBuffer output = new StringBuffer();
...
output.append("bla bla")
..
String result= output.toString();
retourn result;

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top