• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Opening an popup.

 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
 
Climb the rope! CLIMB THE ROPE! You too tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic