d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Need Javascript Help!
Add Reply New Topic New Poll
Member
Posts: 1
Joined: Jun 10 2012
Gold: 0.00
Jun 10 2012 09:57pm
I need help with the javascript on a simple webpage I have. I'm quite new at programming and have just been trying to learn from books. If someone could help me it would go a really long way. I could also have a friend give you forum gold or I can mail you some money. I am hoping to finish this tonight before I go to bed some any help would be appreciated.

The page that I have currently shows a google maps image of the users current location.

Is it possible to create an onclick button that captures the image of the current gps map and display it at the bottom of the page and keeps adding images to the list?
I need it to save at the bottom of the page using Local Storage, not cookies! so that when the user returns, all the images added at the bottom of the page (list) are still there.
Also I need a button to be able to clear the list of images at the bottom.

Please PM me if you can help me write this script and I'll email you the javascript that I already have.

Thank you in advance for your help, I really appreciate it. AND this is my first post so go easy on me!

Member
Posts: 2,736
Joined: Nov 28 2009
Gold: 34.00
Jun 10 2012 10:26pm
Googled: https://www.google.com/search?q=take%20screenshot%20with%20javascript
Found: http://html2canvas.hertzen.com/

With this, you can capture an element and turn it into a base32 image, which can be stored in the users Local Storage. Should be shortened before you put it in the local storage (which each slows the browser afaik), as base64 is pretty large strings. Use md5() for a notable difference:
Code
md5("R0lGODlhUAAPAKIAAAsLav///88PD9WqsYmApmZmZtZfYmdakyH5BAQUAP8ALAAAAABQAA8AAAPb WLrc/jDKSVe4OOvNu/9gqARDSRBHegyGMahqO4R0bQcjIQ8E4BMCQc930JluyGRmdAAcdiigMLVr ApTYWy5FKM1IQe+Mp+L4rphz+qIOBAUYeCY4p2tGrJZeH9y79mZsawFoaIRxF3JyiYxuHiMGb5KT kpFvZj4ZbYeCiXaOiKBwnxh4") = "7ee49891e7cd0ca91304d2a20ec04e80"
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll