?
Solved

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

Posted on 2010-11-09
5
Medium Priority
?
382 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

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'…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
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…
Suggested Courses

777 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