scottspivey
asked on
Open New Window with no tool bars, no nav, no scroll, etc.
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
Response.Write "<p><a href=""TradingPlatform.asp
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
<div onclick="openPopup('Tradin gPlatform. asp','newW indow','no ','no','no ','no','no ','no','10 0','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>
<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>
ASKER
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('Trad ingPlatfor m.asp','ne wPop','wid th=200,hei ght=200,si zeable=no, toolbars=n o,scrollin g=no');">C lick</a></ p>"
-------------------------- --^
it is the same error I was getting when I tried to make the changes myself.
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('Trad
--------------------------
it is the same error I was getting when I tried to make the changes myself.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
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
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 "".
ASKER
ok that makes sense. at least i think it does.
thx.
thx.
<a href="#" onclick="window.open('Trad