Error on change form action
- by Thomas
Hi, I'm changing the form action with:
window.onload = function() {
document.getElementById('pdf').onclick = addExportEvent;
document.getElementById('xls').onclick = addExportEvent;
document.getElementById('xml').onclick = addExportEvent;
document.getElementById('csv').onclick = addExportEvent;
}
function addExportEvent() {
data = grid.getAllGridData();
document.getElementById('dados').setAttribute('value', encodeURIComponent(JSON.stringify(data)));
formulario = document.getElementById('formulario'); // Line 55!
formulario.action = 'php/' + this.id + '.php';
formulario.submit();
return false;
}
But it doesn't work with Internet Explorer. It returns the following error:
Message: The object doesn't support the property or method.
Line: 55
Character: 2
Code: 0
URI: http://www.site.com/javascript/scripts.js