Forums

This topic is locked

Hello please help me wit this problem

Posted 23 Oct 2007 11:35:30
1
has voted
23 Oct 2007 11:35:30 Suhas Shivaram gowda posted:
Hello friend,
Im working on a hardware portal. I'm providing a link to open a new window from where the user can select the product he wants from the radiobuttons given for each product. When the user selects a radiobutton and clicks on submit button. The newly opened window should close and the selected item should be passed on to the previous window from where the link is given to this window. In the main window, im using tables, so the selected value should come in one of the rows.

I got this code on plus2net.com where the child window closes and refreshes the parent window.
But a reference to php file is given, which in din't get. This code is in the child page.

This is the link to that site-----------> www.plus2net.com/javascript_tutorial/window-refreshing.php

<!DOCTYPE html PUBLIC "-//w3c//dtd html 3.2//en">
<html><head><title>(Type a title for your page here)</title>

<script language="JavaScript">
<!--
function win(){
window.opener.location.href="window-refreshing.php";
self.close();
//-->
}
</script></head><body alink="#ff0000" bgcolor="#ffffff" link="#0000ff" text="#000000" vlink="#800080">

<font face="Verdana" size="2">This is the child window opened . Click the button below to close this window and refresh the main window</font>
<br><br>
<center><input onclick="win();" value="Close this window" type="button"></center>


</body></html>


Please help me how to go about this.
I'll be really thankful to u if u can guide me through this friend.............

Suhas Shivaram Gowda<u></u><b></b><b></b><u></u>

Replies

Replied 13 Nov 2007 16:03:44
13 Nov 2007 16:03:44 Seb Adlington replied:
this is how I normally do a page refresh from a child window.

&lt;SCRIPT LANGUAGE="JavaScript" &gt;

function closeme(){

opener.parent.location.href = 'somepage.asp' ;
setTimeout ("window.close()", 500);

}
&lt;/SCRIPT&gt;

or you can put it on a button within the page

&lt;input name="button" type=button onClick="opener.parent.location.href = 'somepage.asp';self.close();" value="Close Window"&gt;

Cheers

Seb

Reply to this topic