Hello All,
New to the world of jQuery, and JavaScript in general.
How do I "pass" (POST/GET??) a jQuery selection set from one page to another?
Specifically, I'm talking about passing an XML node, but the process would be the same for passing a <div> tag and its contents, right?
On the first page, I use jQuery to parse an XML file, then when the user clicks a link, I want to pass a reference to a child XML node (depending on which link they click) to the 2nd page.
Then, the 2nd page will have some jQuery that will parse the child node.
I think a (probably too simplified) example would be:
page1.html:
- <script>
- var someChildNode = $(xml).children().children();
- function clickIt(){
- // Open page2.html
- // Pass the var someChildNode to it <-- Don't know how to do this!
- }
- </script>
- <a href="page2.html" onClick="clickIt()">Some Link</a>
page2.html:
- <script>
- var page2Data = someChildNodeFromPage1.html; <-- Don't know how to do this!
- // Do stuff with page2Data!
- </script>