1

I have a page say abc.xhtml and xyz.xhtml. Both are opened at same time, and there is a button in abc.xhtml and when it is clicked, is it possible to reload xyz.xhtml. Can this be achieved using javascript?

Hello Man
  • 693
  • 2
  • 12
  • 29

1 Answers1

0

If by "both are opened at the same time" you mean in the same browser, than yes. This is achievable by manipulating browser cookies using JavaScript document.cookie property. See Javascript communication between browser tabs/windows for more details.

If you want to change xyz.xhtml that is opened on another client, first client can trigger remote change by comunicating with second client using server in the middle. (If you want to stricly use JavaScript, you can use server-side variant of it, i.e. nodeJS).

Community
  • 1
  • 1
Dejv
  • 944
  • 2
  • 14
  • 31
  • Then if you open xyz.xhtml from abc.xhtml, you can use the method Shrinivas Shukla suggests. If you don't, you'll have to use cookies for this. – Dejv Jul 22 '15 at 09:49