I am using the following code to open a popup window and passing the ID of as query string.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script language="javascript" type="text/javascript">
function openwindow(divID) {
window.open("pp.html?id="+divID+"","","status=yes, location=yes, width=700, height=400");
}
</script>
</head>
<body>
<a href="#" onclick="openwindow('one')" id="one">One</a>
<br />
<a href="#" onclick="openwindow('two')" id="two">Two</a>
<br />
<a href="#" onclick="openwindow('three')" id="three">Three</a>
</body>
</html>
The scenario is, i need to show the DIV in popup window whose id is similar to querystring value. Popup window code is
<html>
<head>
<script language="javascript" type="text/javascript">
function getid() {
if (Request.QueryString("id")!=null)
var id = Request.QueryString("id");
document.getElementById(id).style.display = "block";
}
</script>
</head>
<body onload="getid();">
<div style=" overflow:hidden">
<div style="margin-left:-5px;"><input type="file" style="" /></div>
</div>
<div style="width:200px; height:200px; border:1px solid #999999; background- color:#CCCCCC; display:none" id="one">Hello! ONE</div>
<div style="width:200px; height:200px; border:1px solid #999999; background-color:#CCCCCC; display:none" id="two">Hello! TWO</div>
<div style="width:200px; height:200px; border:1px solid #999999; background-color:#CCCCCC; display:none" id="three">Hello! THREE</div>
</body>
</html>
Now, Popup window is giving error "Request is undefined".
Please help with me with the solution.
Thanks Lokesh Yadav