File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes boolean  need_ of_ vbscript_in_jsp() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "boolean  need_ of_ vbscript_in_jsp()" Watch "boolean  need_ of_ vbscript_in_jsp()" New topic
Author

boolean need_ of_ vbscript_in_jsp()

joseph prabhu
Ranch Hand

Joined: Feb 26, 2008
Posts: 162
hello joseph here

i have developed projects using jsp.

For client side validation i used java script.

but some occasion i need server side validation.

did we need vb script for this or else , can we do those in java script itself.
how is my subject.
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

Hi Joseph,
Firstly please UseAMeaningfulSubjectLine

And what type of server side validation do you need. Because I dont think you will need VBscript in any case.
Please provide some details.


SCJP, SCWCD.
|Asking Good Questions|
joseph prabhu
Ranch Hand

Joined: Feb 26, 2008
Posts: 162
Originally posted by Amit Ghorpade:
Hi Joseph,
Firstly please UseAMeaningfulSubjectLine

And what type of server side validation do you need. Because I dont think you will need VBscript in any case.
Please provide some details.


Hello joseph here

suppose i have register.jsp

there i display combo box of country. if i select any country
then new combo box have to display contains states have to display in same
page. If i select any states then another new combo box have to displayed on on same page contains cities.
Matteo Di Furia
Ranch Hand

Joined: Jun 20, 2008
Posts: 102
Well, it depends how you manage the selecting action. If after a selection you submit a form and reload the page with the new select, then you don't need nor JavaScript nor VBScript, just handle things in a servlet (or in the same JSP, which I do NOT recommend). If, instead, you do not wish to submit any form data, you have to include every select option in the page and handle the visualization of the right box via JavaScript and CSS display property. Again, there's no actual need of VBScript.
joseph prabhu
Ranch Hand

Joined: Feb 26, 2008
Posts: 162
Originally posted by Matteo Di Furia:
Well, it depends how you manage the selecting action. If after a selection you submit a form and reload the page with the new select, then you don't need nor JavaScript nor VBScript, just handle things in a servlet (or in the same JSP, which I do NOT recommend). If, instead, you do not wish to submit any form data, you have to include every select option in the page and handle the visualization of the right box via JavaScript and CSS display property. Again, there's no actual need of VBScript.


hello joe again

how that can be done in jsp itself. because

onchange event can call only a javascript function. how that can do operations in jsp.

please give the code for the problem i gave in previous mail.
Matteo Di Furia
Ranch Hand

Joined: Jun 20, 2008
Posts: 102
The change event could submit a form the action of which is the JSP itself (again, I don't recommend this). The JSP code check if the form was submitted and handle the selected choices to show the adequate sub-selections.
It's just one of the many ways you could do this.
joseph prabhu
Ranch Hand

Joined: Feb 26, 2008
Posts: 162
Originally posted by Matteo Di Furia:
The change event could submit a form the action of which is the JSP itself (again, I don't recommend this). The JSP code check if the form was submitted and handle the selected choices to show the adequate sub-selections.
It's just one of the many ways you could do this.


hello joe here
if i call the same page again from onchange that again starts from first.

can you give the code for that three combobox, ie Country,State,Cities.

. you told one of the many ways, can you say other ways also.
Matteo Di Furia
Ranch Hand

Joined: Jun 20, 2008
Posts: 102
Well, to continue this JSP example :



This is just an example, probably need to tune it but should work more or less in this way. Again, I don't recommend this way, you should move the processing of the input data on a servlet and include the desired parameters back to the JSP if you miss some needed value, but if you want to stick with the JSP-only implementation, something like this might do the job.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by joseph prabhu:
hello joseph here

i have developed projects using jsp.

For client side validation i used java script.

but some occasion i need server side validation.

did we need vb script for this or else , can we do those in java script itself.
how is my subject.


I have no idea what you're asking.
VBScript is a proprietary Microsoft technology that doesn't run in any Servlet/JSP container that I'm aware of. Also, on the client side, it only runs in MSIE so it is a poor choice of technology for any web application unless there can be a guarantee that users will only ever try to use your application from a windows machine with MSIE.

As was mentioned earlier, your subject line, with the underscores, and hard to decipher text is not going to help you to attract knowledgeable people to your question. You can change it by clicking on the image in the top post of this thread.

-Ben
[ July 25, 2008: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

Originally posted by joseph prabhu
please give the code for the problem i gave in previous mail.


You can always ask for help, but please dont ask people to write code for you because the forum is NotACodeMill.
[ July 27, 2008: Message edited by: Amit Ghorpade ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: boolean need_ of_ vbscript_in_jsp()