Hi,
I thought I wouldn’t have to ask this silly question on a forum ?
But, I can’t seem to find the solution anywhere.
I have a JavaScript that opens a new window when a button is clicked.
It works fine. But, I want to [B]re-direct the Parent Window
Here is my script :
[CODE]<script type=”text/javascript”>
function OpenWindow() {
window.open (‘/My_Folder/file.php’, ‘newwindow’, config=’height=670, width=1400, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no’);
}
</script>
And, of course the button :
[code=html]<input type=”button” value=”Submit” onclick=”OpenWindow()”>
So, in order to be able to re-direct the Parent Window, after the new window has popped up, I added a simple line to my JS function :
[CODE]<script type=”text/javascript”>
function OpenWindow() {
window.open (‘/My_Folder/new_file.php’, ‘newwindow’, config=’height=670, width=1400,
toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no’);
}
setTimeout(1000, ‘/My_Folder/PHP/file_2.php’);
</script>[/CODE]
Meaning, after the new window has popped up, the Parent Window should [B]re-direct in 1 second.
But, for some reason, it’s not working.