wood burning stoves
The moose likes Struts and the fly likes Opening an popup. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Opening an popup." Watch "Opening an popup." New topic

Opening an popup.

Arulanand Dayalan
Ranch Hand

Joined: Aug 10, 2005
Posts: 124
Hi All,

I am using struts. I have a req. in which i click on submit button i need to open an pop up show some values and close of that popup do some validations. I am using an modal dialog for doing that. I am doing this way

var check=window.showModalDialog("LoadPreSum.do?strSeqID="

Here the problem is strNum can be any character. If strNum contains %,& etc, i am getting error and i am not able to get the exact values in action class. Can any one suggest a way to avoid this.

Thanks and Regards,
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Since this value might have characters that will mess up a URL, you will have to write a javaScript function that will encode offending characters. Then send strNum to that function before putting it into the URL.

Here's a sample javaScript encoder fucction that I got off the web:

Consultant, Sima Solutions
I agree. Here's the link: http://aspose.com/file-tools
subject: Opening an popup.
It's not a secret anymore!