0

I was finding difficult to get the value of tag of one page and use that value in another page. Note that the value are getting dynamically in the page. one part is static value and other part is dynamically coming. It is coming when we start a session. These two values are separated by pipe(|). Below is the example: site 1:

<select name="ETD" id="nBFDXS">
    <option value="xxx|12341234123412341234123421341234123412" >abc </option>
</select></td>

xxx is the static value which is separated by pipe then the dynamic values.

now I want to store this value and use this value in another page. which has same code as above. How i can do this? TIA

Mikkel Fennefoss
  • 857
  • 1
  • 9
  • 32
Kapil Bisht
  • 9
  • 1
  • 3
  • 9
  • Did you start implementing a solution that did not work? – KAD Feb 07 '17 at 07:23
  • 1
    – Kapil Bisht Feb 07 '17 at 07:29
  • 1
    you can save the value in global `window` object, or you can storage like `local/session Storage, cookies etc`, you can also use url query params, hash etc. – Vikramaditya Feb 07 '17 at 07:31
  • _"use this value in another page"_ Can you describe what you are trying to achieve? What is "another page"? – guest271314 Feb 07 '17 at 07:32
  • @Vikramaditya : Any you provide me with examples – Kapil Bisht Feb 07 '17 at 07:38
  • @guest271314 : I am using this value in another page where it is using same value. i am looking to enter the value in the page. Actually every time it is creating new value. – Kapil Bisht Feb 07 '17 at 07:41
  • localStorage.setItem('code', $('#nBFDXS').val()); as the option is single. – Parvez Rahaman Feb 07 '17 at 07:51
  • See [JavaScript Session storage variable on another page](http://stackoverflow.com/questions/38034647/javascript-session-storage-variable-on-another-page), [Can the mechanism that loads the worker in Shared Web Workers be modified?](http://stackoverflow.com/questions/38938039/can-the-mechanism-that-loads-the-worker-in-shared-web-workers-be-modified), [Can we refer to javascript variables across webpages in a browser session?](http://stackoverflow.com/questions/36146595/can-we-refer-to-javascript-variables-across-webpages-in-a-browser-session) – guest271314 Feb 07 '17 at 07:53

0 Answers0