natalieG Posted July 28, 2006 Share Posted July 28, 2006 In our window code beklow, when we try to open the window.document, we get an errormessage saying "onject does not support automation". we want to write HTML code to thewindow. Thanks,Jennifer<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> <meta name="generator" content="Adobe GoLive 6"> <title>Welcome to Adobe GoLive 6</title> <script language="JavaScript"> function openWin(){ newWin = open("# ","window","height=400 width=400,top=200 left=200"); newWin.document.open(); }/* openwindow */ function closeWin(){ close(newWin); }/*close window*/ </script> </head> <body bgcolor="#ffffff"> <form action="#" method="get" name="FormName" > <button name="buttonName" type="button" onClick="openWin()">Open</button><BR> <button name="buttonName" type="button" onClick="closeWin()">Close</button> </form> <p></p> </body></html> Quote Link to comment Share on other sites More sharing options...
lead2gold Posted July 28, 2006 Share Posted July 28, 2006 I think your problem is here:[code] function openWin(){ newWin = open("# ","window","height=400 width=400,top=200 left=200"); newWin.document.open(); }/* openwindow */[/code]Your missing commas, which is a syntax error. Also try using window.open().change it to:[code] function openWin(){ var obj_newWin= window.open("# ","window","height=400,width=400,top=200,left=200"); }/* openwindow */[/code] Quote Link to comment Share on other sites More sharing options...
natalieG Posted July 28, 2006 Author Share Posted July 28, 2006 we corrected the copmmas and tried again and eveything we try casues the same errro-"class does not support automatiopn". we then chan ged a bit and tried some code to do the same thing from a couple of javascript books and we get the same result. We are using IE6 under Windows SP4, and tghere must be soemething more fundamental at work hgere. any ideas?Natalie Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.