Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get back in old window from a new window

 
Abhra Kar
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a index.jsp-------

<html>
<head>
<script type="text/javascript">
function myfunc(){
var fname=document.getElementById("fname");
var lname=document.getElementById("lname");
window.open("result1.jsp?fname="+fname.value+"&lname="+lname.value,"mywindow","width=200,height=200");
}
</script>
</head>
<body>

<form name="form1">
First Name:
<input type="text" name="fname" id="fname" />

Last Name:
<input type="text" name="lname" id="lname" />

<input type="button" value="click here" onclick="myfunc()" />
</form>
</body>
</html>


and result1.jsp---------

<html>
<body>
<form>
<input type="text" name="credential" value="${param.fname}" />
<input type="hidden" name="lastname" value="${param.lname}" />
<input type="password" name="password"/>
<input type="submit" value="click it" />
</form>
</body>
</html>


Now I want when i click the submit button control goes back to old index.jsp(not in this new window) page
how i can do that.
any body id concept is present?
please guide me
thanks in advance
 
Rajkamal Pillai
Ranch Hand
Posts: 445
1
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

If you were to call a window.close() in the new window that pops up you could close that.
 
Abhra Kar
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks

But i want to go back to the old window from this new window .I don't want only close the new window
i want to access the "credential" and "password" from result1.jsp in the old index.jsp
How it will be possible ?please suggest
thanks
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To set focus to the new window:



Eric
 
Abhra Kar
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have solve my problem with your help
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic