View Full Version : strange behaviour in IE6

08-16-2005, 11:30 AM

got a small problem:
this one is the head of an index.html of a site in design...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="Alpha Presse, Verlag f&uuml;r K&uuml;nstlerb&uuml;cher, Kunstb&uuml;cher, Mixed-Media-Objekte, literarische Installtionsprojekte, Frankfurt">
<meta name="keywords" content="Alpha Presse, Verlag, Frankfurt, K&uuml;nstlerb&uuml;cher, Kunstb&uuml;cher, Mixed-Media-Objekte, literarische Installtionsprojekte, art, books, art books, publisher, publishing">
<title>Alpha Presse</title>
<script type="text/javascript">
function openWindow ()
breite = 935;
hoehe = 680;
posH = Math.round((screen.width-breite)/2);
posV = Math.round((screen.height-hoehe)/2);
hauptfenster = window.open("Alpha.html", "Alpha Presse", " \"Width="+breite+",Height="+hoehe+",left="+posH+",top="+posV+" \" ");

as you see there's a function

now, it's called in the body by this line:

<p><font size="6" face="AvantGarde Md BT, Helvetica, Geneva, Arial, SunSans-Regular, sans-serif"><a href="javascript:openWindow()"><img src="../Release v1.0.0/gfx/AlphaLogoStart.png" alt="" height="355" width="355" align="middle" border="0" /></a></font></p>

nothing too complicated in total, BUT:
every browser is running the script without trouble, except the IE (v6)!
the debugger reports a argument error at line 15, which is this one

hauptfenster = window.open("Alpha.html", "Alpha Presse", " \"Width="+breite+",Height="+hoehe+",left="+posH+",top="+posV+" \" ");

but i don't see the point, why it's not working....

someone got an idea?



08-16-2005, 11:54 AM
I think it is a matter of incorect quotes.Try this

var hauptfenster = window.open('Alpha.html','Alpha Presse','width='+breite+',height='+hoehe+',left='+posH+',top='+posV);

08-16-2005, 12:39 PM
nope :) its quite equal if you use double- or singlequotes in JS, i recon.

just solved it myself!

the matter was:

hauptfenster = window.open("Alpha.html", "Alpha Presse", " \"Width="+breite+",Height="+hoehe+",left="+posH+",top="+posV+" \" ");

syntax is window.open("url", "name", "para1,2,3"); you know i guess :)

just changed the url to alpha.html (w/out capital A) and the name into alpha_main, and it works. think its the name... IE seems not to accept blanks in name parameters.


EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum