473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

problem with openning a new window

Hi, I'm using the following code to open a new window in specified size, and I
don't want it to be located at the default position. Strangely, seems only
"top" can work. Could anyone please help me out?
<script language="jscript">

/* Open window*/
var windowHandle = '';
function popOpen(url,name,attributes) {
// windowHandle = window.open(url +escape(url),name,attributes);
windowHandle =
window.open(escape(url),name,"'left=20,top=20,widt h=500,height=600");
}
</script>
<A
onclick="popOpen('links2.htm');"
href="javascript:void(0);">
<IMG height=20 src="images/bullet.gif" width=21 border=0>Open Links Page
</A>
Jul 23 '05 #1
3 1572
Fang wrote on 21 jun 2005 in comp.lang.javascript:
"'left=20,top=20,width=500,height=600"


replace " ' with "

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 23 '05 #2
Lee
Fang said:

Hi, I'm using the following code to open a new window in specified size, and I
don't want it to be located at the default position. Strangely, seems only
"top" can work. Could anyone please help me out?
<script language="jscript">

/* Open window*/
var windowHandle = '';
function popOpen(url,name,attributes) {
// windowHandle = window.open(url +escape(url),name,attributes);
windowHandle =
window.open(escape(url),name,"'left=20,top=20,wid th=500,height=600");
}
</script>
<A
onclick="popOpen('links2.htm');"
href="javascript:void(0);">
<IMG height=20 src="images/bullet.gif" width=21 border=0>Open Links Page
</A>


Your name parameter is undefined and you've got an extraneous
single-quote in your attributes parameter.

Jul 23 '05 #3
Fang wrote:
<script language="jscript">
<http://validator.w3.org/>
/* Open window*/
var windowHandle = '';
The value returned by window.open() is an object reference. Although type
conversion will be performed, you should either initialize with `null' or
don't initialize at all.
function popOpen(url,name,attributes) {
// windowHandle = window.open(url +escape(url),name,attributes); ^^^^^^^^^^^^^^^^? windowHandle =
window.open(escape(url),name,"'left=20,top=20,widt h=500,height=600"); ^^^^ ^ does not belong here
undefined }
</script>
<A
onclick="popOpen('links2.htm');" ^^ href="javascript:void(0);">
<http://jibbering.com/faq/#FAQ4_24>
<http://validator.w3.org/checklink>
<IMG height=20 src="images/bullet.gif" width=21 border=0>Open Links Page
The `alt' attribute is missing. <http://validator.w3.org/>
</A>

PointedEars
--
The English government is much of a German poodle as
other governments. The Germans infiltrated them all.
-- "The only real Barbara Schwarz", dsw.scientology,
<16**************************@posting.google.com >)
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: janaka44 | last post by:
I need to open a new window, and make it work as a new session, so that i can initially load the page i need and let the user work in it without affecting the parent window's session variables
3
by: Yaqian | last post by:
Hi, I want to open a new window without tool bar, address bar and status bar. then inside the page, there are a few links, i want, when clicking a link, a new window opens, but still without tool...
5
by: Tedmond | last post by:
Dear all, How can I get all the titles of all openning windows? I found a API in win32 that called EnumWindows() but it returns only the windows handles, not titles. How can I get the list just...
4
by: Ohad Young | last post by:
Hi, I need to open (launch) an external application from my winform application. The application is not a dot.net application, for example the windows calculator. I'm using the...
0
by: eyal | last post by:
Hi, I'm trying to open a window with a given path, like (open conatin folder) with C#. for example i have this path: C:\Temp i have it in my ListView and what i need is when i double click on...
4
by: HVG | last post by:
Hi, is it possible to render a whole page (ie. a aspx webform) to a string _without_ actually loading the page in a window? Eg if Iam executing page1.aspx at the server, I would then like to...
2
by: Eitan | last post by:
Hello, I want open a new page (on the same window), by using some vb script (I am in aspx file). How can I do that ? Thanks :)
2
by: Cc | last post by:
hi, while I making my own class library using odbc.net I encounter strange problem in this class Public Sub New() ' some code doing openning connection end sub
1
by: mahesh123 | last post by:
Hi, I am using the VB6.0 and for report crystal reports 8.0. the reports are not openning(means its openning but immediately it is closed the report) when we installed the reports in other system....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.