0

I have a jsp page which opens another jsp in new tab. In the second jsp I upload a file on the server (I need the second jsp because there I made some important things). I want somehow to put a link to this file in the first jsp but without refreshing it (because I have fields with user data and I dont want this data to be lost). I want to make it asynchronously. I know I can put ajax in the first jsp and update the DOM but how to trigger this ajax from the second jsp?

ivanlirchev
  • 17
  • 1
  • 7

1 Answers1

0

The problem is that you open the new tab. It is not possible to communicate between tabs with JS. Basically, you have to use the iframe. You may find some useful information for example here https://stackoverflow.com/a/14570255/5462443 and that is how it is possible to access parent window from the iframe https://stackoverflow.com/a/9006960/5462443.

Community
  • 1
  • 1