Click to See Complete Forum and Search --> : open window and then submit form


hyde11
06-27-2003, 06:27 AM
I am trying to click on a button to open a window, and then submit the originating form. Can't get it to work. Help please.....thanks.

Here is the code:

<script type="text/javascript">
<!--
function openHabitat()
{
window.name="MainWindow";
document.report.action = window.open("../../template/tem_habitat2.cfm");
document.report.submit();
}

-->
</script>

Khalid Ali
06-27-2003, 09:28 AM
Relace yoor openhabitat function

unction openHabitat()
{
window.name="MainWindow";
document.report.action = window.open("../../template/tem_habitat2.cfm");
document.report.submit();
}

with this one

unction openHabitat()
{
var popupWin = window.open("../../template/tem_habitat2.cfm","popupWin);
document.report.submit();
}

hyde11
06-27-2003, 10:14 AM
that worked...