If I should be asking this in the General Programming area please advise.
I found this bit of code for openning a window and running an asp-page in it. I almost have it working but I'm hanging up somewhere. I believe it is mostly in the call and therefore I should be asking this elsewhere but am not completely sure.
Any help is always appreciated!
When I hard code the passed arguments into the popgeneral.asp file and execute popgeneral by itself it works as expected. It is when I try to call it this way that all I end up with is a blank window. I cannot even get response.writes to work in the new window.
This is the calling function:
CODE
<script language="javascript"><!--
function popgeneral(vField,vQuery,vReturn){
var nW = window.open('', 'popup',
'resizable=no,scrollbars=yes,width=400,height=420');
nW.location.href = 'popgeneral.asp?field=' + vField + '&query=' +
esc(vQuery) + '&ret=' + esc(vReturn);
nW = null;
}
//--></script>
This is the call:
CODE
<input type="submit" value="Select" name="btn" onclick="popgeneral('test1.Txt1', 'SELECT Players.PlayerID, Players.First, Players.Last, Players.fldUsername FROM Players ORDER BY Players.fldUsername;', 'PlayerID')"><br>