does anyone know how to refresh a page PHP

  • JackDaRippaZ
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jun 25, 2004
  • Posts: 11
  • Status: Offline

Post July 24th, 2004, 10:20 pm

hey peoples,

does anyone know how to refresh a page in PHP from another window.

ie. say i have 2 windows, called 'window1' and 'window2',

if i open window2 from window1, is it possible to refresh window1 from window2, as i want to make changes in window2 that affect window1. (i will be make changes to the database in window2 and displaying results in window1)

thanks again, hope its not to long winded to understand
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post July 24th, 2004, 10:20 pm

  • Platinum•
  • Novice
  • Novice
  • User avatar
  • Joined: Jun 30, 2004
  • Posts: 25
  • Loc: Australia
  • Status: Offline

Post July 24th, 2004, 11:10 pm

how many seconds delay do you want it to be befor the page refreshes
  • Axe
  • Genius
  • Genius
  • User avatar
  • Joined: Jan 07, 2004
  • Posts: 5744
  • Loc: Sub-level 28
  • Status: Offline

Post July 25th, 2004, 7:25 am

PHP cannot refresh anything. Your actual output would have to include HTML or JavaScript.

PHP == Server Side
Local Windows in your Web browser == Client Side
  • veedee
  • Graduate
  • Graduate
  • User avatar
  • Joined: Jul 09, 2004
  • Posts: 110
  • Status: Offline

Post July 25th, 2004, 8:37 am

I don't think PHP could do that, in my opinion you must use javascript.
Here the code in javascript.

in window2 (child window);

<button onClick="window.close();window.opener.location.reload(true);">CLOSE & REFRESH PARENT WINDOW</button>
  • Ub3rl33t
  • Novice
  • Novice
  • No Avatar
  • Joined: Jul 23, 2004
  • Posts: 34
  • Status: Offline

Post July 25th, 2004, 9:46 am

Uh frames or actual browser windows?
  • omirix
  • Banned
  • Banned
  • User avatar
  • Joined: Jul 23, 2004
  • Posts: 129
  • Loc: 127.0.0.1
  • Status: Offline

Post July 25th, 2004, 10:49 am

hes talking about two windows
  • Cafu
  • Student
  • Student
  • No Avatar
  • Joined: Jul 15, 2004
  • Posts: 97
  • Status: Offline

Post July 25th, 2004, 11:17 am

I think veedee's suggestion is what you are looking for, but you probably want to take the window.close() part out of it.
  • JackDaRippaZ
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jun 25, 2004
  • Posts: 11
  • Status: Offline

Post July 25th, 2004, 8:41 pm

ok so with the following:

<button onClick="window.close();window.opener.location.reload(true);">CLOSE & REFRESH PARENT WINDOW</button>

i am assuming that this code will close the current window (window2) and reload (window1). the parent page (window1) is a PHP page, does this matter, can it still be done.

Cos this is exactly what i want to do, if the above can be achieved
  • veedee
  • Graduate
  • Graduate
  • User avatar
  • Joined: Jul 09, 2004
  • Posts: 110
  • Status: Offline

Post July 26th, 2004, 6:38 am

Quote:
i am assuming that this code will close the current window (window2) and reload (window1).

Yes, exactly that's what I meant

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 258 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
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.