In sample_3.jpg, we see the init() function. The first line declares that the variable foo is equal to all the elements with the tag name “a”. This fills foo with an array of all the anchor tags in the document, including the one described above in sample_2.jpg.
In sample_5.jpg, the function fillInput() will take the url and parse the required information into the template in sample_4.jpg. In this function, we want the ##moreurl## and the title — data from the previous database that was transferred over. We search for the beginning of each field in the complete url, placing values in the variables pos/pos2. If both variables are defined, meaning they were found in the url, we can get the required data through substrings.
Thus our end result is seen in sample_4.jpg where we have a url with the data passed from one database to another to fill in a template!