Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: How do I refresh the contents of a parent Frame


Message #1 by "Daragh Hartnett" <dhartnett@c...> on Fri, 9 Nov 2001 23:03:51
Thanks for that Max!

> If I understand correctly what you mean, I have had to do the same
> thing.  If you want frame 2 to raise an event that would cause frame 1
> to reload what you do is make a form in frame 2 like this:
> 
> <form id=3DReloadFrame1 name=3DReloadFrame1 action=3D"Frame1URL"
> target=3D"IDOfFrame1" method=3D"post">
>   ....in here you could put hidden fields with values to pass to frame1
> if you want,
> or you can put nothing in here at all.
> </form>
> 
> In a <script> block in frame 2 define a function like this:
> 
> function autoSubmit(){
>   ReloadFrame1.submit();
> }
> 
> Then, using Javascript behind any event on Frame2 that you want to,
> simply call autoSubmit() and frame1 will reload.  It is kind of a kluggy
> way of doing it--submitting a form from one frame with the target
> attribute specifying the other frame--but it works, trust me.
> 
> -max
> 
> 
> 
> -----Original Message-----
> From: Daragh Hartnett [mailto:dhartnett@c...]
> Sent: Friday, November 09, 2001 4:04 PM
> To: JavaScript HowTo
> Subject: [javascript_howto] How do I refresh the contents of a parent
> Frame
> 
> 
> Hi, I have a webpage that defines a horizontal split frame and loads a
> simple jsp file into each of the frames. I want to set up a link/call
> from
> the first jsp file that will reload the parent page.
> 
> The only luck I have had so far is loading the parent frame into the
> first
> jsp file which is obviously not what I want.
> 
> I have looked around the web and on a few websites and have not found an
> 
> answer to this so if ye could help that would be cool!
> 
> D
> Max@b...
> $subst('Email.Unsub')
> 

  Return to Index