Search code examples
javascriptjqueryjspatgatg-dynamo

Store div id value in a variable in JS/JSP


I have retrieved the value of postCode and assigned the same in

document.getElementById("zipCode").innerHTML=postcode;

I am able to access the same using <div id="zipCode">. I want to store the value of ZipCode in a variable or a dsp:param value in JSP such that i can pass this value in my nested JSP(s). Any help regarding this will be highly appreciated.


Solution

  • I finally figured out a solution for the same. I stored the value in a Cookie through Java script and in turn used the Cookie in my Java class to retrieve the Cookie Value.