Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes HTML, CSS and JavaScript and the fly likes How to set value to session in external js file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to set value to session in external js file" Watch "How to set value to session in external js file" New topic
Author

How to set value to session in external js file

soni lal
Greenhorn

Joined: Jan 31, 2011
Posts: 29
Hi,

I have a dropdown in my jsp. on change of this drop down a external javascript method is getting called.

I have to store the selectedindex of dropdown in session.

Please find the dropdown code in js below:
'archiveTypeFilter' : function(element){
element.onchange = function(){
var val = this.options[this.selectedIndex].value;
ACSearch.disableFilters();
ACSearch.searchAJAX(val, '0', 'y', undefined, 'facet');
}
}
here archiveTypeFilter is the name of dropdown.

Please suggest me how to do that.

Please assist me.
Thanks in advance!!

 
GeeCON Prague 2014
 
subject: How to set value to session in external js file