does anyone know how to refresh a page PHP

  • JackDaRippaZ
  • Newbie
  • Newbie
  • JackDaRippaZ
  • Posts: 11

Post 3+ Months Ago

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
  • Platinum•
  • Novice
  • Novice
  • User avatar
  • Posts: 25
  • Loc: Australia

Post 3+ Months Ago

how many seconds delay do you want it to be befor the page refreshes
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

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
  • Posts: 110

Post 3+ Months Ago

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
  • Ub3rl33t
  • Posts: 34

Post 3+ Months Ago

Uh frames or actual browser windows?
  • omirix
  • Banned
  • Banned
  • User avatar
  • Posts: 129
  • Loc: 127.0.0.1

Post 3+ Months Ago

hes talking about two windows
  • Cafu
  • Student
  • Student
  • Cafu
  • Posts: 97

Post 3+ Months Ago

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
  • JackDaRippaZ
  • Posts: 11

Post 3+ Months Ago

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
  • Posts: 110

Post 3+ Months Ago

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 98 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
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.