Solved

how to get the size of the <html:errors /> in java script

Posted on 2010-11-09
5
379 Views
Last Modified: 2012-05-10
hi i have a pop-up jsp page , this one is closed once , the poup-up page is submitted , i written the code to close the pop-p window.But before i closed i need to display certain server side error messages , if iam bale check the the size of the errors in java script i can resist to close the window ,if any knows plz help m e,thanks , leela
0
Comment
Question by:bowebell
  • 3
  • 2
5 Comments
 
LVL 16

Expert Comment

by:HagayMandel
ID: 34094357
If you need some server's data, it means that it' a SERVER-SIDE issue, while your JavaScript is CLIENT SIDE!
It means, that you need to generate an event in your JavaScript that will run an Ajax request, that will update some variable(s) in your script.
Next phase is that your script evaluates the updated variable(s), and then decides whether to close the pop-up window or perform other task(s).
0
 

Author Comment

by:bowebell
ID: 34094399
So there us no way except the ajax , am i right ?
0
 

Author Comment

by:bowebell
ID: 34094419
or let me put in this way ..

how to do server side validation for popup that closes on sub mit?  in java - j2ee struts frame work environment ?
0
 
LVL 16

Accepted Solution

by:
HagayMandel earned 500 total points
ID: 34094469
As generally said:
Before closing, you run the Ajax call, that carries the user's input.
The Ajax returns the validation result to a designated variable.
Then you check this variable, and decide what to do.
See http://www.tizag.com/ajaxTutorial/ajax-javascript.php for a simple Ajax tutorial.
0
 

Author Comment

by:bowebell
ID: 34094786
Thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question