javascript - Uncaught TypeError: Cannot read property 'parentNode' of undefined -


i trying convert google chart image.

i found code on jsfiddle - http://jsfiddle.net/scjm8/32/. want download image without pressing button. try im getting uncaught typeerror: cannot read property 'parentnode' of undefined error.

i tried making example (#test id of 'download image' button):

 $(document).ready(function() {     $('#test').click();  }); 

or:

  <body onload="toimg(document.getelementbyid('pie_div'));"> 

but getting same error.. suggestions how can make download image without pressing button? how can fix error?

i updated jsfiddle. should work now. using script tag inside script tag.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -