• 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 ...
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Submit a form and open pop-up

Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,
I am working on a piece of requirement of a page where it is needed to open a pop-up screen on a click of a hyper-link on a JSP page. The data displayed on that pop-up page should be based on the form POSTED from the jsp page containing the link. Also, this jsp page should not get refreshed while getting posted by clinking on link; means the jsp contents should remain as it is - apparently user should not feel the page is submitted.

I have coded it but could not stop the page to get refreshed.

As of now I am using the Javascript function like:-

The problem with this code is
1. it sbumits the page two times
2. the main JSP page gets refreshed as soon as it POSTS the form.

I don't want to use AJAX as the development time will be increased.

Is there any way to POST the form using this 'WINDOW.OPEN(....)' only, and avoid the submission part from above code ?
Please suggest .
Posts: 67682
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
Please avoid the over-use of bold in future posts. No one likes being yelled at.

If all you want is for the post to opne a new window and for the response to appear there, all you need to so is add target="_blank" to the form element.
and POOF! You're gone! But look, this tiny ad is still here:
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic