Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Popup window jsp page

 
Bacchi Gerem
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
when i click on choose button there is a pop up window appears (popup window is a jsp page ) . It has two buttons ok & cancel . When i click on ok button it has to show another page on parent window and close popup . But it is not working that way. It is showing another page in popup jsp page (pop up window ) not on the parent window.what i need to do here.

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64632
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not a JSP issue. Moved to the HTML/JavaScript forum.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64632
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Code?
 
Bacchi Gerem
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<form name="newtemplate" method="post" action="<%=request.getContextPath()+"/gateway.jsp"%>">" >
<input type="hidden" name="<%=Constants.NEXT_ACTION%>" value="automaticNaming">
<input type="hidden" name="<%=Constants.TEMPLATE_ID%>" value="<%= template.getTemplateId() %>">
<input type="hidden" name="tempId" value="<%= template.getTemplateId() %>">
<span class="formelement"><input type="submit" name="Search Again" value="Ok" onclick="javascript:chooseTemplate(this.form,'<%=errorMessage %>')"></span>
<input type="hidden" name="<%=Constants.SUBCATEGORY_ID%>" value="<%=request.getParameter("subcategoryId")%>">
</form>


function chooseTemplate(formname, errorMessage)
{
if ( formname.selbox.options[formname.selbox.selectedIndex].value != ""){
formname.tempId.value = formname.selbox.options[formname.selbox.selectedIndex].value;
formname.templateId.value = formname.selbox.options[formname.selbox.selectedIndex].value;
formname.submit();
}
else{
document.getElementById('error_section').firstChild.data=errorMessage;
formname.selbox.focus();
}
}
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64632
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to use code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the button on your post.
 
Bacchi Gerem
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
,
I will explain in detail:


tagcat.jsp i.e parent jsp page . It contains a button choose. When i click on choose button it opens another jsp page i.e. popup.jsp page.

Popup.jsp page contains two buttons ok & cancel.

when i click on ok button it has to display a detais.jsp page in parent jsp page place.
But in my case it is displaying popup.jsp page place.





Thanks
 
Bacchi Gerem
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tagcat.jsp



<html>

<body>

<input type="button" name="choose" value="choose" onclick="javascriptpenPopUp('Popup.jsp')">

</body>

</html>


popup.jsp


<html>

<body>

<input type="button" name="ok" value="ok" onclick="javascriptpen('detail.jsp')">

<input type="button" name="cancel" value="cancel" onclick="javascript:window.close()">

</body>

</html>



detail.jsp

<html>

<body>


</body>

</html>


i want to open detail.jsp page in place of tagcat.jsp.. I can open detail.jsp page in place of pop up window i.e. popup.jsp page place.
i.e. detail.jsp page is replaceing popup.jsp page. But i want this datail page in the place of tagcat.jsp page.
i.e. parent window

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64632
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So much for asking for formatted code.
 
Bacchi Gerem
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i redirect to parent window from pop up window jsp page . Please let me know
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bhaskar Gara wrote:

I can open detail.jsp page in place of pop up window i.e. popup.jsp page place.
i.e. detail.jsp page is replaceing popup.jsp page. But i want this datail page in the place of tagcat.jsp page.
i.e. parent window



please try to make it simpler..

as already mentioned by Bear Bibeault, always use [Code Button] inside editing post.. while posting a code inside forum..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic