Created
August 18, 2016 14:56
-
-
Save jdspiral/3fd5c3837717ca2c77590b9223d36126 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fireEvent(element,event) | |
{ | |
if (document.createEventObject) | |
{ | |
// dispatch for IE | |
var evt = document.createEventObject(); | |
return element.fireEvent('on'+event,evt); | |
} | |
else | |
{ | |
// dispatch for firefox + others | |
var evt = document.createEvent("HTMLEvents"); | |
evt.initEvent(event, true, true ); | |
return !element.dispatchEvent(evt); | |
} | |
} | |
function setOption(system){ | |
var obj = jQuery('#attribute225').get(); | |
jQuery(obj).val(system); | |
Event.observe(obj[0],'change',function(){}); | |
fireEvent(obj[0],'change'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment