How to get screen shot of webpage using javascript or jquery? - java

Likes to add screen shot submission for any bugs in my web application which developed using J2EE.That is if there is any bugs then client has the ability to take the screen shot of bug and submit for bug maintains.
So want a efficient mechanism to capture screen shot using JavaScript or Jquery since i want the screen shot of client using my web application.
Already tried with html2canvas.js but it doesn't work in IE8.Wants efficient solution that supports in IE8.
So please help me to find a solution for this.

excanvas.js can be used in html to support canvas.Even though you can't solve it for html2canvas in IE8.

Related

Generating a hardcopy or screen shot using GWT

Is it possible to capture the screen or generate a hardcopy in GWT programatically?
using AWT its possible but the AWT can't be used in GWT[only GWT not any other like smartGWT, ext-GWT]?
On client side GWT do nothing more than Javascript. So your question is: Can I take screen shot in JavaScript? The answer is:
If you want only take screen shot inside browser and can bear different you can use html2canvas.
If you want also take screen shot out of browser, you have to use other technology such as ActiveX control (may be Java Applet with AWT).
Check this: Take a screenshot of a webpage with JavaScript?
I don't believe that you will find anything native in GWT to do this. I believe that the best that you could manage would be something like this:
http://html2canvas.hertzen.com/
GWT just compiles java into javascript as it as been said by other guys in their answer. So you can look for a solution on the client but you can also do it on the server side.
One way to make it is to use phantomJS (which is a kind of webkit on the server) to rasterize the web page into an image on the server side. Could be really usefull to create features like "Export" etc
Phantom JS scree n capture

Firefox = Render the Web-Page to an image file

what is the current "state of art" to render a webpage in firefox into an image file (saved on disk). I want to implement something like "browsershots.org"
1.) Does firefox provide some API to interact with it?
2.) Does the new Canvas (HTML5) Element help here?
The programming language does not matter.
If you know any more information about this topic or a concrete solution, please help.
Uupdate: Yes, the Idea is to do this programatically, only using Technologies "within" Firefox. Further Ideal requirements: Multithreaded (allow rendering of several Websites in parallel on one machine)
Thanks very much, Markus
update: Yes, the Idea is to do this
programatically, only using
Technologies "within" Firefox.
See: https://developer.mozilla.org/en/Drawing_Graphics_with_Canvas#Rendering_Web_Content_Into_A_Canvas
Mozilla's canvas is extended with the
drawWindow() method. This method draws
a snapshot of the contents of a DOM
window into the canvas.
Sounds good, but note that:
This feature is only available for
code running with Chrome privileges.
It is not allowed in normal HTML
pages. Read why.
Why reinvent the wheel?
Fireshot does exactly that: https://addons.mozilla.org/en-US/firefox/addon/fireshot/
Even if you want to implement that yourself, looking at that add-on might help.
Selenium RC is a good choice.
It allows you to control Firefox (and other browsers) using Java (for instance).
For example:
http://seleniumexamples.com/blog/examples/capturing-screenshots-from-remote-selenium-rc/

What is your preferred choice for showing picture galleries?

I am using Fancybox for displaying photo galleries on my web sites.
I am also quite happy with it but as I have to extend it a bit (e.g. show a hyperlink in the caption below the image), I thought it is worth to look around what other gallery frameworks are around.
I am looking for non-flash galleries, non-PHP: JAVA ONLY and jQuery based solutions.
Thanks for your input. I will collect all your feedbacks and update this question text.
ON the client side I recommend the JQuery plugin LightBox.
You can create a gallery from multiple images, and they are all nicely framed in a popup.

Blackberry browser field implementation

I need to display any web page as a browser field,not browser session.I am building the app in 4.7 OS.Can anyone help me with sample code?
On 4.7 you are stuck with the old browser field. Also known as Browser Field 1. It renders HTML pretty close to how it was on 4.5 devices. There is no way to take advantage of the newer browser that you invoke via browser session. So, you can forget about CSS2 or or JavaScript on the pages you want to render as a browser field. But for the fairly basic stuff it is good enough.
For the sample code - you really should check out and understand all the examples there are in the development package before starting writing the code. It will really save more time than take for learning. Look at components\samples\com\rim\samples\device\blackberry\browser\BrowserFieldDemo.java
I doubt that the problem lies with the browser field per se. Rather with communications.
The people in the post that you refer to were probably suggesting ";deviceside=true" as this gets around the "BES effect" in a simulator.
You may wish to experiment with running the MDS emulator alongside the simulator session as well. There are a number of posts that discuss the impact of deviceside and simulation. You can test in code to see if you are running a simulator so that you can programmatically influence the "BES effect".

Pasting a Screen shot into a text area on a web page

Is it possible to take a screen shot (using the Print Screen) and paste it from the System Clipboard directly into a web pages text area field (which I would create)? Do I need a browser plug-in? Can Flash do this?
**The solution only has to work in Internet Explorer.
This is not possible without a plugin.
It's not possible in Flash or Silverlight either, although it is possible in AIR.
I think you will have to write a custom ActiveX Control in order to do this. The control should automatically take a screenshot and send captured image to server-side code..
There is one more option - create a java applet, which will do the job, and also will help you to avoid cross browser issue.

Categories

Resources