views:

181

answers:

4

All,

Can any 1 of you show a small piece of code for generating a thumbnail of any website using javascript or jquery,

I had posted earlier but couldnt find any right match for my requirements.

  <div id="generate_thumbnail" onclick ="generate();">
  //Show thumbnail within this div
  </div> 

  <Script>
   function generate()
   {
        // generate small thumbnail
   }
A: 

I'm sorry, but this is not quite doable with JavaScript.

Matti Virkkunen
+4  A: 

A thumbnail of a website? Such as a miniature browser-screenshot? Sorry, this can't be done without of some sort of external browser-screenshot service:

http://www.zubrag.com/articles/create-website-snapshot-thumbnail.php

thomask
How about generate an iframe and then embed the code within it
Hulk
that wouldn't be a thumbnail...
thomask
+3  A: 

Try some thumbnail generation services with API.

http://www.webresourcesdepot.com/10-free-website-thumbnail-generation-services/

z33m
A: 

At best you could change the to an and try to impose some external CSS to give it a zoom level to shrink down the content. But otherwise there's no way for Javascript to render a page, convert it to an image, and stuff it into another page.

Marc B