thanks for ur solutions.  the thing is that if i directly insert this into
the html file header it works fine:

<script type="text/javascript">
  parent.rightFrame.document.open();
  parent.rightFrame.document.write('<html>');
  parent.rightFrame.document.write('<head>');
  parent.rightFrame.document.write('<link rel="stylesheet"
href="../../media/scripts/sidelayout.css" type="text/css" />');
  parent.rightFrame.document.write('<link rel="stylesheet"
href="../../media/scripts/sidetext.css" type="text/css" />');
  parent.rightFrame.document.write('</head>');
  parent.rightFrame.document.write('<body>');
  parent.rightFrame.document.write('<p>Hello</p>');
  parent.rightFrame.document.write('</body>');
  parent.rightFrame.document.write('</html>');
  parent.rightFrame.document.close();
</script>

it works and shows "hello" in there.  but when i try to take it out and make
a general function, it fails.  and the part that fails is the  "rightopen()"
call.  it says that it expects an object.  i just don't know what it wants.

any ideas?

thanks


-----Original Message-----
From: Remco Oosten [mailto:[EMAIL PROTECTED]]
Sent: March 18, 2002 7:39 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] javascript problem


If your framecontainer is your top-document perhaps you can use:

top.rightFrame.document.open();

or maybe

top.rightFrame.location='';

Remco
----- Original Message -----
From: "Josh Trutwin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, March 18, 2002 4:25 PM
Subject: Re: [PHP-DB] javascript problem


> I am not a JavaScript expert, but I had a similar problem.  I THINK that
> you need to reference your frames like this:
>
> window.parent.frames.rightFrame.document.open();
>
> Give it a try, hope that helps...
>
> Josh
>
> > hi all,
> >
> > i know this is not exactly the place to ask this, but i don't know
> > where else to ask.  i'm doing a multiframe project and i'm trying to
> > get one of the pages to change the content of another frame when it
> > loads.
> >
> > in the main.htm i have:
> >
> > <html>
> > <head>
> > <title>A Global Village?</title>
> > ...
> > <script src="../../media/scripts/rightside.js" type="text/javascript">
> > <script type="text/javascript">
> > <!--
> >  rightopen();
> >  rightwrite('Hello', 'www.yahoo.com', 'Yahoo is really good.');
> >  rightclose();
> > //-->
> > </script>
> > </script>
> >
> > </head>
> > <body>
> > ...
> > </body>
> > </html>
> >
> > the included rightside.js file has the three functions:
> >
> > function rightopen () {
> >  parent.rightFrame.document.open();
> >  parent.rightFrame.document.write("<!DOCTYPE html PUBLIC
> >  \"-\/\/W3C\/\/DTD
> > XHTML 1.0 Strict\/\/EN\""\n);
> >  parent.rightFrame.document.write("
> > \"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-strict.dtd\">"\n);
> >  parent.rightFrame.document.write("<html>"\n);
> >  parent.rightFrame.document.write("<head>"\n);
> >  parent.rightFrame.document.write("<title><\/title>"\n);
> >  parent.rightFrame.document.write("<meta http-equiv=\"Content-Type\"
> > content=\"text\/html; charset=iso-8859-1\" \/>"\n);
> >  parent.rightFrame.document.write("<link rel=\"stylesheet\"
> > href=\"media\/scripts\/sidelayout.css\" type=\"text\/css\" \/>"\n);
> >  parent.rightFrame.document.write("<link rel=\"stylesheet\"
> > href=\"media\/scripts\/sidetext.css\" type=\"text\/css\" \/>"\n);
> >  parent.rightFrame.document.write("<script
> > src=\"media\/scripts\/scripts.js\"
> > type=\"text\/javascript\"><\/script>"\n);
> >  parent.rightFrame.document.write("<\/head>"\n);
> >  parent.rightFrame.document.write("<body>"\n);
> > }
> >
> > function rightwrite (name, url, desc) {
> >  parent.rightFrame.document.write("<p class=\"rightlink\"><a href=\"" +
> >  url
> > + "\" target=\"_blank\">" + name + "<\/a><br \/>");
> >  parent.rightFrame.document.write(desc + "<\/p>");
> > }
> >
> > function rightclose () {
> >  parent.rightFrame.document.write("<\/body>"\n);
> >  parent.rightFrame.document.write("<\/html>"\n);
> >  parent.rightFrame.document.close();
> > }
> >
> > when i start the file i get a javascript error saying "expecting
> > object"
> >
> > i'm not sure what i'm doing wrong.  any help is appreciated.
> >
> > thanks
> >
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> Josh Trutwin
> http://trutwins.homeip.net
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to