Having problem in retrieveing values from pop-up window to main window

Reply

Join Date: Feb 2007
Posts: 18
Reputation: aruna_k_2006 is an unknown quantity at this point 
Solved Threads: 0
aruna_k_2006's Avatar
aruna_k_2006 aruna_k_2006 is offline Offline
Newbie Poster

Having problem in retrieveing values from pop-up window to main window

 
0
  #1
Sep 3rd, 2007
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>&nbsp;|&nbsp;</font></b>Student ID</td><td><input type="text" name="StudentID" value="<%StudentID%>" size="20">&nbsp;&nbsp;&nbsp;&nbsp;<A HREF=JavascriptopWindow("><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
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 85
Reputation: hidash_in has a little shameless behaviour in the past 
Solved Threads: 0
hidash_in's Avatar
hidash_in hidash_in is offline Offline
Junior Poster in Training

Re: Having problem in retrieveing values from pop-up window to main window

 
-1
  #2
Oct 9th, 2007
<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
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,190
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 483
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is online now Online
Code tags enforcer

Re: Having problem in retrieveing values from pop-up window to main window

 
0
  #3
Oct 9th, 2007
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC