• 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
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Calling a JSP from a Javascript

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All ,
I have a javascript where I have some values to be passed as hidden values . I am doing a form.submit using post method in it.
I need to pass those values to the jsp which is invoked from the javascript itself .
Now , how do I invoke the URL along with those values passed to it .
I am doing a window.open but I am not able to pass the values to the jsp .
Any help is appreciated .
 
Sheriff
Posts: 67695
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you doing a window.open or a form submit. You say that you are going both, but you can;t do both at the same time.

If you want the values to be submitted, you'll need to set them as values of form elements (such as hidden elements).

For window.open, pass them as a query string on the URL.

That assumes you can figure out which one you want to do.
 
Prashanth Nayak
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Code goes something like this






In the JSP I am doing this




From the resin logs I can see that I am sample.jsp is accessed but the values are not passed to it. Can you please help .
 
Ranch Hand
Posts: 147
Eclipse IDE Tomcat Server Debian
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where is the JavaScript variable "sIP" being assigned?

Prashanth Nayak wrote:

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic