| 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: 56184
|
|
|
Not a JSP issue. Moved to the HTML/JavaScript forum.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56184
|
|
|
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: 56184
|
|
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="javascript penPopUp('Popup.jsp')">
</body>
</html>
popup.jsp
<html>
<body>
<input type="button" name="ok" value="ok" onclick="javascript pen('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: 56184
|
|
|
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: 1318
|
|
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..
[Linkedin] How To Ask Questions On JavaRanch My OpenSource
|
 |
 |
|
|
subject: Popup window jsp page
|
|
|