atnpowell
01-08-2004, 05:11 AM
HI there
I am having a problem with what should be a simple pop-up window task.
Below are the three sections of code I'm using to try to submit a form using a text link (ie the word "Help") and openning a small window which will Request the user variable passed.
Everything works fine except the window attributes are completely ignored ... no matter what I try the formatting set in formpop() doesn't register.
**POP UP WINDOW FUNCTION**
function formpop()
{
formWin = window.open('about:blank', 'formWin', 'width=200, height=200');
if (formWin && !formWin.closed)
formWin.focus();
return true;
}
**FORM WITH HIDDEN FIELD TO PASS TO POPUP**
<form action="help.asp" method="get" name="frmHelp" target="formWin" id="frmHelp" onsubmit="return formpop()">
<tr>
<td height="19"></td>
<td valign="top"><input type="hidden" name="user" value="<%=(rsPaperlessUsers.Fields.Item("Username").Value)%>" /></td>
<td></td>
</tr>
</form>
**TEXT LINK THAT SUBMITS FORM**
<a href="javascript:document.frmHelp.submit()">Help</a>
Most of this code seems to follow the classic popup examples found across the web ... so what's going wrong ??
much thanks (in advance)
Andy
I am having a problem with what should be a simple pop-up window task.
Below are the three sections of code I'm using to try to submit a form using a text link (ie the word "Help") and openning a small window which will Request the user variable passed.
Everything works fine except the window attributes are completely ignored ... no matter what I try the formatting set in formpop() doesn't register.
**POP UP WINDOW FUNCTION**
function formpop()
{
formWin = window.open('about:blank', 'formWin', 'width=200, height=200');
if (formWin && !formWin.closed)
formWin.focus();
return true;
}
**FORM WITH HIDDEN FIELD TO PASS TO POPUP**
<form action="help.asp" method="get" name="frmHelp" target="formWin" id="frmHelp" onsubmit="return formpop()">
<tr>
<td height="19"></td>
<td valign="top"><input type="hidden" name="user" value="<%=(rsPaperlessUsers.Fields.Item("Username").Value)%>" /></td>
<td></td>
</tr>
</form>
**TEXT LINK THAT SUBMITS FORM**
<a href="javascript:document.frmHelp.submit()">Help</a>
Most of this code seems to follow the classic popup examples found across the web ... so what's going wrong ??
much thanks (in advance)
Andy