?
Solved

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

Posted on 2006-07-11
7
Medium Priority
?
242 Views
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.

thanks
0
Comment
Question by:scottspivey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 52

Expert Comment

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

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

Expert Comment

by:inviser
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 = this.open(url, windowName, "toolbar=" + tool + ",menubar=" + menu + ",location=" + loc + ",scrollbars=" + scroll + ",resizable=" + resize + ",status=" + status + ",left=" + left + ",top=" + top + ",width=" + width + ",height=" + height);
}
</script>
0
 
LVL 1

Author Comment

by:scottspivey
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="window.open('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.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 52

Accepted Solution

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

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

Author Comment

by:scottspivey
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?

thx,

scott
0
 
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 "".
0
 
LVL 1

Author Comment

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

thx.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

649 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