Solved

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

Posted on 2010-11-09
5
376 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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 discusses how to create an extensible mechanism for linked drop downs.
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…

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now