0

I have a scenario where I have a table in a page and in that table I have 2 columns - id (hyperlink) and status (label). On clicking the link, another tab opens with details. In this tab, I change the status (dropdown) and update it in database. On clicking update, I need to close the tab and return to the table view and update the status (label) there (probably refresh).

Could someone help me with the solution approach please.

Shanky
  • 331
  • 1
  • 4
  • 17
  • 1
    Stack Overflow isn't a coding service. Go and try something yourself and come back if you run into difficulties. – Andy Jun 23 '14 at 13:02
  • 1
    If you want something in the front-end(not using session in your service) you should take a look into [`Dom Storage`](https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage). – DontVoteMeDown Jun 23 '14 at 13:03
  • You can try [using cookies](http://stackoverflow.com/questions/4079280/javascript-communication-between-browser-tabs-windows), if you are using a popup rather than a new tab [here's a method of communication between the tab and the popup window](http://stackoverflow.com/questions/4167965/how-do-you-communicate-between-2-browser-tabs-windows), [and here's a modern solution using localStorage](http://stackoverflow.com/questions/2236828/javascript-communication-between-tabs-windows-with-same-origin/12514384). – enrique-ramirez Jun 23 '14 at 13:04
  • I am asking for a solution approach not the code.Can I pass variables between browser tabs? – Shanky Jun 23 '14 at 13:15

2 Answers2

1

browser tabs are actually another window of that application. So once you understand that it is clear what your solution should look like. You have to store the information either in cookie, session or some sort of data in the browser/ database. otherwise the data is lost.

mygeea
  • 463
  • 3
  • 10
1

Just read the selectbox selected option with JS and prepare the URL like "YourSIte.com/test/index.cfm?selectBox="+selectboxValue and open that in a new tab

Marikkani Chelladurai
  • 1,430
  • 1
  • 13
  • 23