Solved

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

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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
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…

773 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