Open New Window with no tool bars, no nav, no scroll, etc.

Posted on 2006-07-11
Last Modified: 2012-08-13
I have a site written in ASP and I need to add a new feature to open in a new window.  My programmer is out sick and I can't figure out how to get this to work.  Here is what I have so far:

Response.Write "<p><a href=""TradingPlatform.asp"">View Trading Platform</a></p>"

This gets the page that I need to be displayed.  But what I need is to have the window open in a new window, like a popup, and I don't want any toolbars, no scolling, no resize, and I want the window to have a set height and width.  There are several other places in our site that use the same concept.  I have tried to copy and change that code but I can't get it to work.  I keep getting errors and I don't know how to fix them.

Can someone please help?  I am sure this is not difficult, I just don't know how to do it.

Question by:scottspivey
  • 3
  • 3
LVL 52

Expert Comment

by:Carl Tawn
ID: 17084261
You'd use something like:

    <a href="#" onclick="'TradingPlatform.asp','newPop','width=200,height=200,sizeable=no,toolbars=no,scrolling=no');">Click</a>

Expert Comment

ID: 17084296
<div onclick="openPopup('TradingPlatform.asp','newWindow','no','no','no','no','no','no','100','100','640','480')">View Trading Platform</div>

<script language="javascript">
function openPopup(url, windowName, tool, menu, loc, scroll, resize, status, left, top, width, height) {
    OpenWin =, windowName, "toolbar=" + tool + ",menubar=" + menu + ",location=" + loc + ",scrollbars=" + scroll + ",resizable=" + resize + ",status=" + status + ",left=" + left + ",top=" + top + ",width=" + width + ",height=" + height);

Author Comment

ID: 17084311
carl tawn,

this is the error i get with your line of code:

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/Profile.asp, line 918

Response.Write "<p><a href="#" onclick="'TradingPlatform.asp','newPop','width=200,height=200,sizeable=no,toolbars=no,scrolling=no');">Click</a></p>"

it is the same error I was getting when I tried to make the changes myself.
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

LVL 52

Accepted Solution

Carl Tawn earned 500 total points
ID: 17084324
Oh, sorry forgot you were using Response.Write:

    Response.Write "<a href=""#"" onclick=""'TradingPlatform.asp','newPop','width=200,height=200,sizeable=no,toolbars=no,scrolling=no');"">Click</a>"

Author Comment

ID: 17084379
carl tawn,

that works perfect.  you have saved me hours and hours of trouble.

apparently what was throwing the error was the <p> tag i had in the code.  why was that causing me a problem?


LVL 52

Expert Comment

by:Carl Tawn
ID: 17084450
It shouldn't have been the <p> tag it should have been the first ". Because it is a single " the parser expects it to be the end of a string literal, when in actual fact you actually want a " character in there, so it needs to be doubled to "".

Author Comment

ID: 17084612
ok that makes sense.  at least i think it does.


Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Help with stored procedure 30 66
Auto Submit on dropdown box 14 67
RegEx Help - open to other simple suggestions 8 55
FileUp - Classic ASP 5 17
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question