Welcome to Dream.In.Code
Become an Expert!

Join 150,010 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,435 people online right now. Registration is fast and FREE... Join Now!




openning an ASP.page in a new Window

 
Reply to this topicStart new topic

openning an ASP.page in a new Window, Not sure if this is more a scripting issue or an ASP one

BustAGut
19 Nov, 2006 - 08:46 AM
Post #1

New D.I.C Head
*

Joined: 7 Nov, 2006
Posts: 17


My Contributions
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>

User is offlineProfile CardPM
+Quote Post

folen
RE: Openning An ASP.page In A New Window
28 Nov, 2006 - 04:17 AM
Post #2

New D.I.C Head
*

Joined: 7 Mar, 2002
Posts: 47

it workes for me
so the problem must be in popgeneral.asp
check the popup url and try it alone.
if it 'about:blank' then u got "location.href" wrong(as in wrong spelling)

This post has been edited by folen: 28 Nov, 2006 - 04:20 AM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 08:55PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month