Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 11th, 2001, 02:34 AM
carolchua carolchua is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Location: Singapore
Posts: 0 carolchua User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question

Can I use JOptionPane.showConfirmDialog in my servlet? When I test on the live web server, a classnotfound error is found.

If not, how can I call the windows message box from my servlet?

Reply With Quote
  #2  
Old February 12th, 2001, 03:27 PM
wolfespawn wolfespawn is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 68 wolfespawn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
Send a message via AIM to wolfespawn
Quote:
Originally posted by carolchua
Can I use JOptionPane.showConfirmDialog in my servlet? When I test on the live web server, a classnotfound error is found.

If not, how can I call the windows message box from my servlet?





What type of windows dialog box?? you just want a box to pop up to tell them that their stuff was submitted or accepted? If thats the case, you would inbed some javascript to call the box.

this is a long javascript that pops up a little window if someone didnt enter at least 3 characters in a box or forgot to enter something in a text box... i am just too lazy to edit it for you right now... you can take out all the if statements and make it say what you want... I am not sure if you have any exp with JavaScript (it is new to me) but you have to call the script from an event like link click or button click... i will give example of it after this script


out.println("<SCRIPT LANGUAGE = \"JavaScript\">");
out.println("function oops(form1) {");
out.println(" if (form1.actDesc.value == '') {");
out.println(" alert('Please insert a description.');");
out.println(" return false;");
out.println(" } else if (form1.actType.selectedIndex == 0");
out.println(" && form1.actName.value == '') {");
out.println(" alert('Please insert an activity.');");
out.println(" return false;");
out.println(" } else if (form1.actType.selectedIndex == 0");
out.println(" && form1.actName.value.length < 3) {");
out.println(" alert('Activity must be at least 3 characters.');");
out.println(" return false;");
out.println(" }");
out.println(" form1.submit();");
out.println("}");
out.println("</SCRIPT>");

Then wherever you may call the script kinda like

out.println("<TD colspan=2 align=center><INPUT align=middle name=actSubmit type=button value=\"Submit This Activity\" onClick='oops(document.agentAct);'></P>");


hope this is kinda what you were looking for.



Reply With Quote
  #3  
Old February 26th, 2001, 02:26 PM
hoi hoi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Location: NY
Posts: 0 hoi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to hoi
Thumbs up

eh?... swing in servlet?....
first time hearing this.

Swing is for GUI.. Servlet is a server-side tech...
i know you can use a Servlet to create HTML tag
or javascript and send it back to the client side..
then the client side will do interpretation for
the these 2 tags and send more requests to the server
by looking at what items are requested inside the tags.
e.g. an Applet

you can use Swing in the Applet, but duno if all
browsers are supporting it. The Applet can call
a Servlet and communication with it...

that's all i know, hope it helps.
-hoi

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Can I use Swing in Servlets?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap