PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Fri Dec 19, 2014 7:48 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Nov 25, 2002 6:43 am 
Offline
Forum Newbie

Joined: Mon Oct 14, 2002 5:23 am
Posts: 23
I need to write new HTML on a frame. However everytime document.write is called from frame, the whole page reloads (not just that frame).

BTW, index.htm is just composed of text.

main.htm
Syntax: [ Download ] [ Hide ]
<script>

function d()

{

document.write("hello");

}

</script>





<frameset rows="80%,*" framespacing=0 border=0 frameborder=0>

 <frameset cols="30%,*" framespacing=0 border=0 frameborder=0>

    <frame src="index.htm" name="stat" noresize>

    <frameset rows="40%,*" framespacing=0 border=0 frameborder=0>

      <frame src="index.htm" name="action" noresize>

      <frame src="map.php" name="map" noresize>

    </frameset>

 </frameset>

 <frame src="index.htm" name="mesg" noresize>

</frameset>



snip from map.php
Syntax: [ Download ] [ Hide ]
echo "

<script>

parent.d();

</script>"
;



Also, how can I use variables from main.htm in the "action" frame?

thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 26, 2002 12:13 am 
Offline
DevNet Evangelist
User avatar

Joined: Tue May 07, 2002 9:48 am
Posts: 8391
Location: Berlin, ger
hm hm hm...only guessing but you might pass a reference to the frame's document to the function.
Syntax: [ Download ] [ Hide ]
<script>
function d(oDoc)
{
  oDoc.write("hello");
}
</script>
---------------
<script>
parent.d(document);
</script>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group