wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Opening an popup." Watch "Opening an popup." New topic
Author

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="
+strSeqID+"&strNum="+strNum
+"&strButton="+strButton,window.self,
"dialogHeight:280px;dialogWidth:950px;status:no;scroll:no;help:no");

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,
Arul.
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:


Merrill
Consultant, Sima Solutions
 
wood burning stoves
 
subject: Opening an popup.
 
Similar Threads
problem with h:inputtext in Rich:ModalPanel
Help for the Opener for a Popup Window in javascript
Pass value to update jsp
How to share the data between two web pages ?
How to convert integer to string and string to integer?