Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    strange behaviour in IE6

    hi!

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

    Code:
    <!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">
    <head>
    	<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+" \" ");
    		hauptfenster.focus();
    	};
    	</script>
    </head>
    as you see there's a function

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

    Code:
    <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

    Code:
    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?

    ty

    SE

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    I think it is a matter of incorect quotes.Try this

    Code:
    var hauptfenster = window.open('Alpha.html','Alpha Presse','width='+breite+',height='+hoehe+',left='+posH+',top='+posV);
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    nope its quite equal if you use double- or singlequotes in JS, i recon.

    just solved it myself!

    the matter was:

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

    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.

    thanks!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •