| | |
Having problem in retrieveing values from pop-up window to main window
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
This is my main window
<html>
<head>
<SPAN style="COLOR: green"><script language=javascript>
function PopWindow(URL,height,width)
{
// alert("in popwindow");
window.open(URL,height+width,"width="+width+",height="+height+",resize=no,resizable=no,scrollbars=yes,menubar=no,status=no");
window.focus();
}
</script>
</head>
<body>
<%
String StudentID=request.getParameter("id2");
System.out.println(StudentID);
%>
<form method="Post" name="f1" action="">
<table border=0 align=left>
<tr>
<td align=left><b><font color="maroon" size=3> | </font></b>Student ID</td><td><input type="text" name="StudentID" value="<%StudentID%>" size="20"> <A HREF=Javascript
opWindow("><imgsrc="images/search.gif" border=0></a></td>
</tr>
</table>
<!-- end of table -->
</form>
this is my pop up window code
<c:forEach var="i" items="${bean.studentid}">
<tr><td>
<a href=http://127.0.0.1:8081/I_Campus/MainWindow.jsp?>&id2=<c:outvalue='${i.key}'/>onclick=window_close() ><c:out value="${i.key}"/></a></td>
<td><c:out value="${i.value}"/>
</td>
</tr>
</c:forEach>
but when the window is closed the value is not retrieved in main window ..can any one help me up
i am getting value in system.out.println();
but not in text box(input box)
<html>
<head>
<SPAN style="COLOR: green"><script language=javascript>
function PopWindow(URL,height,width)
{
// alert("in popwindow");
window.open(URL,height+width,"width="+width+",height="+height+",resize=no,resizable=no,scrollbars=yes,menubar=no,status=no");
window.focus();
}
</script>
</head>
<body>
<%
String StudentID=request.getParameter("id2");
System.out.println(StudentID);
%>
<form method="Post" name="f1" action="">
<table border=0 align=left>
<tr>
<td align=left><b><font color="maroon" size=3> | </font></b>Student ID</td><td><input type="text" name="StudentID" value="<%StudentID%>" size="20"> <A HREF=Javascript
opWindow("><imgsrc="images/search.gif" border=0></a></td></tr>
</table>
<!-- end of table -->
</form>
this is my pop up window code
<c:forEach var="i" items="${bean.studentid}">
<tr><td>
<a href=http://127.0.0.1:8081/I_Campus/MainWindow.jsp?>&id2=<c:outvalue='${i.key}'/>onclick=window_close() ><c:out value="${i.key}"/></a></td>
<td><c:out value="${i.value}"/>
</td>
</tr>
</c:forEach>
but when the window is closed the value is not retrieved in main window ..can any one help me up
i am getting value in system.out.println();
but not in text box(input box)
Last edited by aruna_k_2006; Sep 3rd, 2007 at 5:59 am.
Nikki
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JAVASCRIPT">
function doZoomback(sourceobj, destinationObj)
{
destinationObj.value=sourceobj.value;
window.close();
}function doZoom(obj)
{
window.open("Zoomin.jsp?txttest=" + obj.value)
}
</SCRIPT>
</HEAD><BODY>
<TEXTAREA name="txtTest"><%=request.getParameter("txttest")%>
</TEXTAREA>
<input type="submit" name="cmdOK" value="OK" onclick="parent.doZoomback(txtTest,opener.document.all.txttest)">
</BODY></HTML>
The above program is similar to ur program so i think it will solve ur problem..
leave ur comment to my id
<HEAD>
<SCRIPT LANGUAGE="JAVASCRIPT">
function doZoomback(sourceobj, destinationObj)
{
destinationObj.value=sourceobj.value;
window.close();
}function doZoom(obj)
{
window.open("Zoomin.jsp?txttest=" + obj.value)
}
</SCRIPT>
</HEAD><BODY>
<TEXTAREA name="txtTest"><%=request.getParameter("txttest")%>
</TEXTAREA>
<input type="submit" name="cmdOK" value="OK" onclick="parent.doZoomback(txtTest,opener.document.all.txttest)">
</BODY></HTML>
The above program is similar to ur program so i think it will solve ur problem..
leave ur comment to my id
Mixing Java and JavaScript what a bad idea...
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
![]() |
Similar Threads
- "Open new window" Window Size - how to change? (Web Browsers)
- IE6 not permitting window.close() or window.focus() - any ideas (HTML and CSS)
- Calendar window is not coming for the Dynamic rows (JavaScript / DHTML / AJAX)
- Calling function in a child window from main parent window (C#)
- Drawing bitmap on window - how to clear window/HDC? (C)
- WIN32 GUI application - Problem popping up dialog box (C++)
- Win32 - Controls on main window (C++)
- How to make a window an active window(focussed window) (C++)
Other Threads in the JSP Forum
- Previous Thread: Inserting table row values generated dynamically into database using JSP
- Next Thread: inser data into database
| Thread Tools | Search this Thread |
apache backbutton combobox connection database development directorystructure dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 network parameters passing ping printinserverinsteadofclient redirect request.getparameter response servlet servletdopost()readxml sessions software ssl state_saving_method stocks sun tomcat tutorial update video web






