Meaningless Drivel is fun!*
The moose likes HTML, CSS and JavaScript and the fly likes Popup window jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Popup window jsp page" Watch "Popup window jsp page" New topic
Author

Popup window jsp page

Bacchi Gerem
Ranch Hand

Joined: Jan 23, 2004
Posts: 120
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

Joined: Jan 10, 2002
Posts: 61066
    
  66

Not a JSP issue. Moved to the HTML/JavaScript forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61066
    
  66

Code?
Bacchi Gerem
Ranch Hand

Joined: Jan 23, 2004
Posts: 120
<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

Joined: Jan 10, 2002
Posts: 61066
    
  66

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

Joined: Jan 23, 2004
Posts: 120
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

Joined: Jan 23, 2004
Posts: 120
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

Joined: Jan 10, 2002
Posts: 61066
    
  66

So much for asking for formatted code.
Bacchi Gerem
Ranch Hand

Joined: Jan 23, 2004
Posts: 120
How can i redirect to parent window from pop up window jsp page . Please let me know
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

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..


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Popup window jsp page