Hi,
i am creating a popupwindow example.After entering the details i want to close the parent window(details. html)as it is moving to new window.could anybody suggest how can i do both task at a time i.e., closing the parent window and opening the new window.
Thanks in advance.
Following is my code:
Popup.html
details.html
i am creating a popupwindow example.After entering the details i want to close the parent window(details. html)as it is moving to new window.could anybody suggest how can i do both task at a time i.e., closing the parent window and opening the new window.
Thanks in advance.
Following is my code:
Popup.html
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<A HREF="javascript:void(0)"onclick="window.open('details.html','details','dependent=no,width=300,height=200,menubar=yes,status=yes,location=yes,toolbar=yes,scrollbars=yes')">Open a new window</A>
</body>
</html>
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<script>
function getURL(sClassName,sInstance){
alert("in getURL:::"+sClassName+"::"+sInstance);
window.open();
}
</script>
<form method="post">
<table border="0" align="center" bgcolor="999999">
<tr>
<td>choose from the list</td>
<td>
<select name="classname">
<option value="Router">Router</option>
<option value="Session">Session</option>
<option value="IP">IP</option>
</select>
</td>
</tr>
<tr>
<td>Enter Host Name</td>
<td><input type="textfield" name="instance"/></td>
</tr>
<tr>
<td height="38" colspan="2"> <div align="center">
<input type="submit" name="submit" value="click" onclick="getURL(classname.value,instance.value);"/>
</td>
</tr>
</table>
</form>
</body>
</html>
Comment