473,386 Members | 1,812 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.

popups don't work with IE6

Hi

Can anyone tell me why the following javascript code doesn't work with
IE6? (It's fine with Firefox of course ...)

(in teh document head)
<script type="text/javascript" language="javascript1.2">
<!--
function smallpopup(purl)
{
var newwindow=window.open(purl,'engoi.com',
'left=500,top=100,width=550,height=350,scrollbars= 1,toolbar=1');
if (window.focus) {newwindow.focus();}
return false;
}
function largepopup(purl)
{
var newwindow=window.open(purl,'engoi.com',
'left=500,top=100,width=550,height=500,scrollbars= 1,toolbar=1');
if (window.focus) {newwindow.focus();}
return false;
}
-->
</script>

..
..
..

(in the document body)

<a href="../somedir/myscript.cgi?lang=en"
onClick="return smallpopup('../somedir/myscript.cgi?lang=en')">do it!
</a>

The doc loads with no errors, but when the link is clicked, IE6
complains that the arg to the function is improper, and loads in a
normal window.

If anyone can help, that's great!

Thanks

Daniel

Jan 16 '06 #1
4 1427
VK

da*************@gmail.com wrote:
Hi

Can anyone tell me why the following javascript code doesn't work with
IE6? (It's fine with Firefox of course ...)

(in teh document head)
<script type="text/javascript" language="javascript1.2">
<!--
function smallpopup(purl)
{
var newwindow=window.open(purl,'engoi.com',
'left=500,top=100,width=550,height=350,scrollbars= 1,toolbar=1');
if (window.focus) {newwindow.focus();}
return false;
}
function largepopup(purl)
{
var newwindow=window.open(purl,'engoi.com',
'left=500,top=100,width=550,height=500,scrollbars= 1,toolbar=1');
if (window.focus) {newwindow.focus();}
return false;
}
-->
</script>


I don't believe you it works in Firefox... But off topic, anyway.

1) Assigned window name is the 2nd argument of window.open(), not the
1st one.
2) Probably a string jam grace to Google Groups but just in case: the
entire method call must be one line.

This call works: (if it's broken on two or more lines it's because of
your news reader: it is *one* line)

var
newwindow=window.open('http://www.google.com','www','left=500,top=100,width=550, height=350,scrollbars=1,toolbar=1');

Jan 16 '06 #2
VK said the following on 1/16/2006 4:15 PM:
da*************@gmail.com wrote:
Hi

Can anyone tell me why the following javascript code doesn't work with
IE6? (It's fine with Firefox of course ...)

(in teh document head)
<script type="text/javascript" language="javascript1.2">
<!--
function smallpopup(purl)
{
var newwindow=window.open(purl,'engoi.com',
'left=500,top=100,width=550,height=350,scrollbars= 1,toolbar=1');
if (window.focus) {newwindow.focus();}
return false;
}
function largepopup(purl)
{
var newwindow=window.open(purl,'engoi.com',
'left=500,top=100,width=550,height=500,scrollbars= 1,toolbar=1');
if (window.focus) {newwindow.focus();}
return false;
}
-->
</script>

I don't believe you it works in Firefox... But off topic, anyway.


It would as this question/problem was brought up a week or so ago.
1) Assigned window name is the 2nd argument of window.open(), not the
1st one.
And nothing to the contrary in the code. The problem is the period in
the window name. Firefox happily accepts it but IE doesn't.
2) Probably a string jam grace to Google Groups but just in case: the
entire method call must be one line.

This call works: (if it's broken on two or more lines it's because of
your news reader: it is *one* line)

var
newwindow=window.open('http://www.google.com','www','left=500,top=100,width=550, height=350,scrollbars=1,toolbar=1');


Because your window name does not have a period in it. Change your
window name from 'www' to 'w.w.w' and your code will break in IE but
work fine in Firefox.
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?

Please quote what you are replying to.

If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at
the top of the article, then click on the "Reply" at the bottom of the
article headers.

Jan 16 '06 #3
VK wrote:
da*************@gmail.com wrote: <snip>
var newwindow=window.open(purl,'engoi.com',
'left=500,top=100,width=550,height=350,scrollbars= 1,toolbar=1');

<snip>
1) Assigned window name is the 2nd argument of window.open(),
not the 1st one.
Too drunk to even count?
2) Probably a string jam grace to Google Groups but just in
case: the entire method call must be one line.

<snip>

What is the point in posting such an obvious lie? Surly it can only
serve to make it obvious that you are a fool of staggering proportion (a
redundant action given your posting record)?

Richard.
Jan 16 '06 #4
Thanks very much for the helpful replies ... the rest I'll ignore!
D

Jan 17 '06 #5

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

Similar topics

3
by: Art | last post by:
NEWBIE ALERT! Esteemed List Participants and Lurkers: (System: P-II 350, 192 meg, Win98 SE, Python 2.2.3, wxPythonWIN32-2.4.1.2-Py22.exe) I'm having a lot of fun getting started with Python...
52
by: Harlan Messinger | last post by:
Can you help me figure out what to do about popups? Sometimes we develop web applications where popups make very good sense for precisely the same reasons they make sense in traditional...
3
by: PSERVE | last post by:
Is the a way of preventing popups from other sites while your page is loading? -- Regards Nik http://www.itconsultancy.org
3
by: griffith | last post by:
I need some rather technical spidering advice, and I'm hoping that this is a good place to find it (and my apologies if this isn't). My site contains pages of images, where each image includes a...
2
by: Wee Bubba | last post by:
i started by designing my web page using frames. i had my data entry form in an upper form and my data rows displaying in a lower frame. i soon discovered that ASP.NET is not really meant for...
4
by: ciprian.dosoftei | last post by:
Hello, I just finished a tutorial website regarding the development of DHTML popups. The site features several examples with downloadable samples. It also feature more complex effects like...
4
by: dd | last post by:
I have a scenario where my popups are being blocked by IE6+ and Firefox. The problem is that although the popup is a direct result of the user clicking on the link (meaning that they WANT the...
3
by: Raffi | last post by:
Hello, I've been struggling and trying to work around this for a while and have even posted on usenet in the past without any working solutions. I'm posting it again in case someone out there...
1
by: YotamElal | last post by:
Hello, I have a popup problem. When a popup is opened, I want all other popups to close immediatly. (except for its self and it's child popups) Here is my code: code: <!DOCTYPE HTML PUBLIC...
1
by: Moe Sisko | last post by:
Using : ASP.NET 2.0, IE 7. This is a strange problem with popups not working in IE to remote sites, even though popups are allowed in IE. To reproduce, create web site with two pages,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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.