473,803 Members | 3,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="jscri pt">

/* Open window*/
var windowHandle = '';
function popOpen(url,nam e,attributes) {
// windowHandle = window.open(url +escape(url),na me,attributes);
windowHandle =
window.open(esc ape(url),name," 'left=20,top=20 ,width=500,heig ht=600");
}
</script>
<A
onclick="popOpe n('links2.htm') ;"
href="javascrip t:void(0);">
<IMG height=20 src="images/bullet.gif" width=21 border=0>Open Links Page
</A>
Jul 23 '05 #1
3 1589
Fang wrote on 21 jun 2005 in comp.lang.javas cript:
"'left=20,top=2 0,width=500,hei ght=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="jscri pt">

/* Open window*/
var windowHandle = '';
function popOpen(url,nam e,attributes) {
// windowHandle = window.open(url +escape(url),na me,attributes);
windowHandle =
window.open(es cape(url),name, "'left=20,top=2 0,width=500,hei ght=600");
}
</script>
<A
onclick="popOp en('links2.htm' );"
href="javascri pt: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="jscri pt">
<http://validator.w3.or g/>
/* 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,nam e,attributes) {
// windowHandle = window.open(url +escape(url),na me,attributes); ^^^^^^^^^^^^^^^ ^? windowHandle =
window.open(esc ape(url),name," 'left=20,top=20 ,width=500,heig ht=600"); ^^^^ ^ does not belong here
undefined }
</script>
<A
onclick="popOpe n('links2.htm') ;" ^^ href="javascrip t:void(0);">
<http://jibbering.com/faq/#FAQ4_24>
<http://validator.w3.or g/checklink>
<IMG height=20 src="images/bullet.gif" width=21 border=0>Open Links Page
The `alt' attribute is missing. <http://validator.w3.or g/>
</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
1374
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
2981
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 bar, address bar and status bar. My code can open the first new window properly, but it cannot open the second one at all. Could anyone please help me? function popOpen(url,name,attributes) { windowHandle =...
5
4698
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 like the Applications tab in Windows Task Manager? Thanks, Tedmond
4
5671
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 System.Diagnostics.Process class, for example: .... System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.EnableRaisingEvents = false;
0
942
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 it a window with that location will open. please help.
4
1397
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 render page2.aspx to a string _without_ returning to the client. I currently happily override the Render property of a page and capture its html that way, but so far this requires me to postback to the client and open the page in a little window,...
2
1137
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
1262
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
1167
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. I installed all the depends for the reports. The system is 64 bit WinXP which i installed the reports. Regards ------------ Mahesh
0
9700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9564
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10546
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10292
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9121
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6841
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.