I have a wicket Form and a AjaxButton on it, my requirement is to create a
cookie/local storage on form submit. For this i tried to add following js: 

addEvent(form[0], "submit", save); 

function addEvent(elem, evt, fn) { 
                if (elem.addEventListener) 
                        elem.addEventListener(evt, fn, false); 
                else if (elem.attachEvent) 
                        elem.attachEvent("on" + evt, fn); 
} 

function save() { 
........ 
createStorage(....); 
} 

but this js is not executed at all, submit event is not fired.(I dont want
to use setPersistent() also as I want to use localstorage as well) 

Can you please tell me how to add  javascript to form submit for the above
scenario. 

TIA 
Krishna Mohan 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Adding-javascript-to-form-submit-tp4658587.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to