5

I have create grid using JavaScript and I want to save that grid with some dropped image as a image. here is my link

9
  • Can't be done from a browser. Commented Mar 17, 2011 at 7:52
  • You want to make a screen capture of the dhtmlgoodies_xpPane div? Commented Mar 17, 2011 at 7:54
  • @Zakaria yes I want to save a part of page that is created by jquery. Commented Mar 17, 2011 at 8:08
  • @Moumita +1 Interesting... and this is useful for applications Commented Mar 17, 2011 at 8:36
  • @Moumita similar question here: stackoverflow.com/questions/193221/… Commented Mar 17, 2011 at 8:39

1 Answer 1

1

If you can restrict this usage to browsers using canvas elements, and with firefox extensions -- so firefox in fact, you can load any part of the DOM in a canvas and extract image for the canvas. Basically:

canvas = document.getElementById("#acanvas"); 
if (canvas.getContext) {
    var context = canvas.getContext('2d');
    context.drawWindow(here_any_part_of_the_DOM_tree_not_only_window);
    var mypng = context.toDataURL();
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.