473,890 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why this custom open.window( ) function works on some PCs only

Greeting all,

I am studying Javascript to custom my yahoo estore,
I need to open a custom sized window in a new browser ,
I tried the following script on 3 different PCs running XP
pro. IE 6, it worked on one and did not work on the other two.
Please need your help.

Thanks
Luka

<script language="JavaS cript" type="text/JavaScript">
<!--
function MM_openBrWindow (theURL,winName ,features)
{
window.open(the URL,winName,fea tures);
}
//-->
</script>
<body>
<a href="http://mysite ; target = "_blank";

onClick="MM_ope nBrWindow('http ://mysite','winNam e',

'resizable = yes,toolbar=no, directories=no, location=no,

status=no, menubar=no, resizable=no, scrollbars=no,

width=200,heigh t=200, screenX=100, screenY=75');

return false"
......

Jul 23 '05 #1
3 4185
w2***@insight.r r.com wrote:
Greeting all,

I am studying Javascript to custom my yahoo estore,
I need to open a custom sized window in a new browser ,
Late last year I read a report that the use of pop-up blockers had
increased by 1400% between 2003 and 2004. If you are in business do you
really _need_ to be turning away a growing proportion of potential
customers? This is probably an instance of trying to solve the wrong
problem, and costing yourself revenue in the process.
I tried the following script on 3 different PCs running
XP pro. IE 6,
Since I read the report mentioned above XP SP2 was released, with its
own pop-up blocker (active by default).
it worked on one and did not work on the other two.
Please need your help.

Thanks
Luka

<script language="JavaS cript" type="text/JavaScript">
The type attribute alone is sufficient in an opening SCRIPT tag. The
language attribute is deprecated in HTML 4.01.
<!--
Using what may be taken as HTML comment to "hide" scripts from older
browsers is no longer necessary.
function MM_openBrWindow (theURL,winName ,features)
Ahh, Macromedia javascript (enough said).
{
window.open(the URL,winName,fea tures);
}
//-->
</script>
<body>
<a href="http://mysite ; target = "_blank";
onClick="MM_ope nBrWindow('http ://mysite','winNam e',
'resizable = yes,toolbar=no, directories=no, location=no,

<snip>

The 'feature' list provided as the third argument to the window.open
function is specified as a comma separated list not a comma-space
separated list. And depriving the use of the ability to resize and/or
scroll is based on the erroneous assumption that it is possible to
precisely control the size and layout of the content of the window. That
cannot be done, and in a commercial context it is not a good idea to
render site content inaccessible because that will also result in
needlessly truing away business.

Richard.
Jul 23 '05 #2
Richard Cornford wrote:
w2***@insight.r r.com wrote:
Greeting all,

I am studying Javascript to custom my yahoo estore,
I need to open a custom sized window in a new browser ,
Late last year I read a report that the use of pop-up blockers had
increased by 1400% between 2003 and 2004. If you are in business do

you really _need_ to be turning away a growing proportion of potential
customers? This is probably an instance of trying to solve the wrong
problem, and costing yourself revenue in the process.

Very good point Richard , however, is there any other way to add a
currency converter calculator to my web page, I was intending to link
to a calculator in a pop up window. I am still in the start of the
learning curve, why some site for example CNN (I looked into their
code)
have more or less the same function yet their pop ups will open
precisely
as expected without triggering the browser blocker?

<snip>
<script language="JavaS cript" type="text/JavaScript">


The type attribute alone is sufficient in an opening SCRIPT tag. The
language attribute is deprecated in HTML 4.01.
<!--


Using what may be taken as HTML comment to "hide" scripts from older
browsers is no longer necessary.


Thanks for the tips.
function MM_openBrWindow (theURL,winName ,features)


Ahh, Macromedia javascript (enough said).
{
window.open(the URL,winName,fea tures);
}
//-->
</script> <body> <a href="http://mysite ; target = "_blank";
onClick="MM_ope nBrWindow('http ://mysite','winNam e',
'resizable = yes,toolbar=no, directories=no, location=no,

<snip>

The 'feature' list provided as the third argument to the window.open
function is specified as a comma separated list not a comma-space
separated list.


I had the impression the Javascript interpreter ignors white space.
And depriving the use of the ability to resize and/or
scroll is based on the erroneous assumption that it is possible to
precisely control the size and layout of the content of the window. That cannot be done, and in a commercial context it is not a good idea to
render site content inaccessible because that will also result in
needlessly truing away business.

Richard.


Another good point, I was planning to publish the store then optomize
through trial and error, this will save me some pitfalls.

Thanks for all the help.

Luka

Jul 23 '05 #3
..w2000..@insig ht.rr.com wrote:
Richard Cornford wrote:
w2***@insight.r r.com wrote:
> <a href="http://mysite ; target = "_blank";
> onClick="MM_ope nBrWindow('http ://mysite','winNam e',
> 'resizable = yes,toolbar=no, directories=no, location=no,

<snip>

The 'feature' list provided as the third argument to the window.open
function is specified as a comma separated list not a comma-space
separated list.


I had the impression the Javascript interpreter ignors white space.


That is true for space characters outside of literals (due to automatic
semicolon insertion it does not apply generally to white space which
includes newline characters). The white space occurs within a string
literal here and so is not ignored by the J(ava)Script engine (consider
a sentence/paragraph lacking all spaces/line breaks -- you don't really
want that).

However, it is not the J(ava)Script engine to parse that string but another
component of the UA; `window' refers to a host object, not an JS/ECMAScript
object (although described so prior to JavaScript 1.4 since Netscape UAs
were the only one to implement true JavaScript), and window.open() is now
(as of JavaScript 1.5, Gecko DOM and IE DOM) specified as a proprietary DOM
feature, not a language feature. But it always had the syntax Richard
described.
PointedEars

P.S.
Please trim your quotes.
Jul 23 '05 #4

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

Similar topics

4
7600
by: Anna Quick | last post by:
I am quite new to javascript, and don't seem to find the problem with stupid internet explorer. The script works fine in safari and mozilla. I searched the groups, but evidently put in the wrong keywords, didn't find the solution. It seems to be as easy as it gets: open a new window with a new url. in IE (I am using IE in mac osx), the error message is: Microsoft JScript runtime error: Line: 9
5
31230
by: Derek Erb | last post by:
I am banging my head against the wall with this one. The following code snippets work perfectly fine in MSIE6. But produce an error in Firefox and do not work at all. BROWSER.HTM <HTML> .... <div class="Abb"> <h2 id="ABTit">BROWSER</h2> </div>
29
5040
by: wayne | last post by:
Hey there... I'm having some problems passing url parameters with an open.window command. I'm not terribly familiar with java script but here is the code below. When executed it opens the window properly but does not pass the parameter. (this is part of a coldfusion template) <a href="##"
14
2793
by: Paul | last post by:
Hi I have 2 functions in java script, one opens a second window-this works, the other is supposed to close this second window, does not seem to be working. Just wondering if anyone had any ideas. Here is the code, the functions are <script language="javascript"> function openwin(){ win_usr=window.open ("control_numinfo.aspx") } function closewin(){
4
1925
by: louise raisbeck | last post by:
I have this scenario (simplified) function addnewdata () { check for partial match already in db for information entered by user if (partialmatch succeeds) { open new window aspx page (using javascript) with a datagrid of these partial match records (by doing a sqlcommand using some query string values taken from opener data entered) *** }
4
1811
by: gabe | last post by:
i have a solution to gather the text in each window that is open, but would rather use only managed code rather than unmanaged code my current solution relies on. The purpose is to get the text in each open window even/especially for child windows in other non managed mdi apps - if excel has 3 books open or any other mdi app has several windows open, I'd like the complete text from each window. The current solution gives me more info...
2
1872
by: Inny | last post by:
Im using the following script to resize and Automate thumbnails of user posted images on my forum. However I dont like the white background of the new window. Im wondering if its possible to launch the full size image in a customized window with a background image, such as Image veiwer window <script> function ResizeThem() { maxheight=250; maxwidth= 250; imgs=document.getElementsByTagName("img");
2
973
by: Rambaldi | last post by:
Why only one? Well, what has been happen to me is that the window just pop up after the second click and i dont know why this is happening. The code inside the link button is: protected void CicloCamLink_Click(object sender, EventArgs e) { string openWindow = @"window.open('CicloCamarasWindow.aspx','anycontent','width=455,height=435,resizable=1')";
1
7402
mageswar005
by: mageswar005 | last post by:
Hello, In My Application i have open the PDF file from javascript open.window function.In This scenario i want to control / Hide the PDF Toolbar from open.window function. My Current code is given below function poponload(strs) { var path="d:/files/hello.pdf"; testwindow= window.open (""+path+"", "mywindow","location=0,status=0,scrollbars=1,toolbar=no,resizable=yes,width=500,height=500"); testwindow.moveTo(0,0);
0
9815
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
11215
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...
0
10802
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10451
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8008
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7160
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();...
0
5835
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6035
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3267
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.