How to access a variable in a function from inside a jsp tag

BedacangeCaug

New Member
I have the following function:\[code\] <script> function assign() { var val = ""; val = document.form1.text1.value; alert(val); }\[/code\]I want to access the variable val's value inside jsp tag so that i can pass it to the googlePlus method as a String. I tried making var val as a global variable, but it doesnt work. How can I access the variable val inside the following code?\[code\]<%String output = "";if ( Boolean.valueOf(request.getParameter("submitted")) == true ) { Scraping h = new Scraping(); output = h.googlePlus();}%>\[/code\]
 
Back
Top