> On Wed, 2004-08-11 at 00:13, Matthew Sims wrote: >> > hi... >> > >> > this probably doens't belong here.. but i'll try! >> > >> > i have a two frame window. when the user logs into the 'main' window, >> i >> > want >> > to be able to 'update' the 'main' window and then hte 'nav' window. >> some >> > underlying vars are getting set, and i need to be be able to refresh >> > elements/links in the 'nav' window with the new values... >> > >> > searching through google, hasn't really shed any insight/light on the >> best >> > approach for this.. >> > >> > any ideas/pointers/comments/thoughts... >> > >> > thanks >> > >> > -bruce >> >> I think javascript would be your cup of tea...getting the browser to >> reload a frame. >> >> Google is your friend: >> http://www.google.com/search?q=javascript%20reload%20frame&hl=en&lr=&ie=UTF-8&sa=N&tab=gw >> > > Have been trying to find a way to do this myself. One idea I had to do > this from within PHP was to define the nav frame as a function which > would be called based on the actions in the main window. The nav frame > function would use the target elements to send their output to the > correct frame. > > Have not tried this yet so I am not sure that would work. Have not been > able to think of any other way to do it from PHP. > > > -- > Scot L. Harris <[EMAIL PROTECTED]>
The problem with this is that once the PHP code has been executed...it's done! No more code will run until the webpage is refreshed/submitted/reloaded/whatever. You can't have PHP force a reload of a particular frame. It's all or nothing. PHP doesn't understand frames. It simply takes in variables, does its little shindig, spits out HTML and then it goes asleep. Any events that happen within the browser can only be accompanied by client-side instruction code. When you click the submit button in that one frame, only that frame will reload. PHP will view the two frames as two seperate web browsers with no correlation between them. I've created the exact same thing with what you're describing at my work. The login is in the left frame and when someone logs in, all my variables are stored in $_SESSION vars and I use javascript to reload the right frame by way of <body onLoad="parent.right.location.reload()">. Now both frames have access to the $_SESSION vars. If you want to make this work with with PHP, remove the frames and simply use the form submit to reload the same page. -- --Matthew Sims --<http://killermookie.org> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php