I have a problem getting document.getElementById to work in IE
- or -
Post a project like this4137
$$
- Posted:
- Proposals: 4
- Remote
- #192543
- Awarded
Description
Experience Level: Intermediate
this function works in chrome and ff but not in IE. Please can you help?
document.getElementById('save_button').addEventListener('click', function() {
stage.toDataURL({
callback: function(dataUrl) {
var filename = "";
var postdata = "canvasData="+dataUrl+filename;
var ajax = new XMLHttpRequest();
ajax.open("POST", 'test_result.php', true);
ajax.setRequestHeader('Content-Type', 'canvas/upload');
ajax.onreadystatechange=function()
{
if (ajax.readyState == 4)
{alert("image saved");
document.getElementById('white_button_right_2').style.display = 'block';
document.getElementById('save_button').style.display = 'none';
}
}
ajax.send(postdata);
}
});
}, false);
SAVE
document.getElementById('save_button').addEventListener('click', function() {
stage.toDataURL({
callback: function(dataUrl) {
var filename = "";
var postdata = "canvasData="+dataUrl+filename;
var ajax = new XMLHttpRequest();
ajax.open("POST", 'test_result.php', true);
ajax.setRequestHeader('Content-Type', 'canvas/upload');
ajax.onreadystatechange=function()
{
if (ajax.readyState == 4)
{alert("image saved");
document.getElementById('white_button_right_2').style.display = 'block';
document.getElementById('save_button').style.display = 'none';
}
}
ajax.send(postdata);
}
});
}, false);
SAVE
Jayne P.
0% (0)Projects Completed
-
Freelancers worked with
-
Projects awarded
50%
Last project
25 Apr 2024
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies