Hi All,
I have to design a web page in which all file(pdf) present in particular folder is visible.Onclick ing particular Item,the file should open in new window.
There is link on parent window which show wether the newly open window is still open or closed.
I have implemented the first part through <a href="JavaScrip t..."..>txt</a>
and able to view the file in new window.
But the second part ,I am not able to implement.
I try with this code
[CODE=javascript]<script type ="text/javascript" language ="javascript " >
var my_window =null;
function ClosePopup()
{
if(my_window && my_window.close d)
{
alert('Window already closed!');----1
}
else if (my_window && my_window.open)
{
alert('Close the window!');
}
}
function TestPopUp(My_Hr ef)
{
my_window = window.open(My_ Href, "mywindow","sta tus=1");
}
</script>[/CODE]
.
Every time 1st alert is getting executed irrespective of state of the child window.
Please help.
Manohar
I have to design a web page in which all file(pdf) present in particular folder is visible.Onclick ing particular Item,the file should open in new window.
There is link on parent window which show wether the newly open window is still open or closed.
I have implemented the first part through <a href="JavaScrip t..."..>txt</a>
and able to view the file in new window.
But the second part ,I am not able to implement.
I try with this code
[CODE=javascript]<script type ="text/javascript" language ="javascript " >
var my_window =null;
function ClosePopup()
{
if(my_window && my_window.close d)
{
alert('Window already closed!');----1
}
else if (my_window && my_window.open)
{
alert('Close the window!');
}
}
function TestPopUp(My_Hr ef)
{
my_window = window.open(My_ Href, "mywindow","sta tus=1");
}
</script>[/CODE]
.
Every time 1st alert is getting executed irrespective of state of the child window.
Please help.
Manohar
Comment