I posted a related question earlier but given the response I don't think my question was clear. My index page contains a form and the index() function assigns the user input in this form to a variable: session.userQuery
session.userquery is then processed in resultsDisplay() and sent to a number of API's. The data returned from these API's is processed and displayed on resultsDisplay.html. On results.html the user is given suggestions for an alternative term. This is where my query lies. I want the generated suggestions to be clickable links that will restart the resultsDisplay() function with the clicked term as the new session.userQuery value. The results generated will then be relative to the new term. I hope this makes sense. As I've said, it's like when a user misspells a word in Google and they ask "Did you mean...." and when you click the suggested term, the suggested term replaces the user's original input. *def index():* #assigns user input to session.userQuery *def resultsDisplay():* #processes session.userQuery #sends processed string to number of API's #processes API returns #returns data *resultsDisplay.html: * Results: <ul> <li> results </li> </ul> Suggestions: <ul> <li><a href="resultsDisplay.html" onclick=session.userData= "suggestion"> suggestions</a> </li> </ul> --