I am getting value from another page by sending it as part of url query. I want to know how to set that value to textbox or any component in current html page.

I tried document.getElementById().value. But it is not working.

Is there a way in javascript where I can store a variable value which can be passed to subsequent pages and depending on that I do some action in current page?


Member Avatar

You have to parse the url for the page you are on to get the query string information. You can also use cookies or local storage.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.