How do you get a div that is populated with a live screen image of an external website without using iFrames? e.g. www.google.com
I want to produce a portfolio website, I have a number of sites that are regularly updated. What I want to do is have javascript open on page load, I want it to find a specific external site (e.g. www.google.com) and then take a screenshot. Then I want it to display the screenshot on my portfolio page. Or show a live view of the website inside a div. I dont want to use iFrames as I feel it just looks out of place. I don't need the JS to save the screenshot, just to display it.
Related
My website uses a single page, which loads all its content in iframes, and I would like to know how I can make the page URL change when each piece of content is viewed.
Then I would also like these URLs to work as links to the content.
Here is my site:
http://www.dosed.co.uk
If you click any project, you'll see what I mean. I want to be able to link someone to a specific project (so something like "http://www.dosed.co.uk?project=fish").
How can I do this with javascript?
Our client has two websites and they share one common section, he wants us to pick data on the fly from one website and display it as it is in the other website, excluding the header and footer. I tried using an iframe but the page contains Flash and it does not show the Flash content in the child website. Using an iframe I was able to show the entire website (Flash didn't load) but I don't want the header and footer.
Any help would be appreciated.
Note : We don't have database or code access to the parent web site from where we are picking the data.
didn't quite understand your Note..
Considering you can add some code to both sites and you want to show only part of the site -
assume you have siteA and siteB here is a simple solution:
siteA can open an iframe that hosts siteB with a url param like ?sendSiteA=true
in the js of siteB, when parsing this param you will have a function that will grab section that you want to show, append it to the body and hide everything else.
this is not the best way to share data, but it will work.
P.S. you can pass the dimensions of the iframe in another url param and adjust the dimentions of rht section in siteB
I have come across html2canvas thanks to a previous question of mine. What I am confused about is how could I implement it to do the following:
Create a live thumbnail of a live website.
When the live thumbnail is clicked it loads a bigger image of the website.
What would be the best way to feed the uri's into the script?
All images will have specific hxw set in the image tag or the css for the specific class.
If the website you are trying to create a thumbnail for is different from the actual page the user is on, you'll need to first download the HTML of the page to your server (same origin), after which you can wrap it inside an iframe and create a screenshot of that.
The screenshot generated will be 1:1 size with the actual site, so to create a thumbnail you'd have to resize the screenshot.
The script doesn't accept HTML, url's or anything else except for DOM elements as an input for rendering a page. As such, the only way you can generate a screenshot using the script is to have it either load on the page where you want the screenshot to be generated or load the page within an iframe (under same origin, so you'll need to download the source through a proxy if you use cross-origin).
I am trying to add a Pinterest button onto a product page for a single image in a Facebook Tab app.
The Pinterest code is grabbed from their goodies section, and must include a URL, the Media URL and the Description.
I am not that proficient with Javascript. I am trying to pull the URL and insert into the Javascript button for a single item. Please see below; Thanks.
Pin It
Since you trying to get Pinterest button working in Facebook Page tab this will not work due to inability to know which Page you're on in JavaScript.
This info is passed to server with signed_request. You have couple of options to do so:
Build the link to page that will be linked to "Pin" server-side
Pass information about Page and Page Tab to client side and build the link here.
Beware that this is just a link and it will not looks like Pin-It button until you including Pinterest JavaScript (//assets.pinterest.com/js/pinit.js) on a page. If you build that link in Client Side you must include that JavaScript after, so link will be replaced by iframe with actual Pin-It button.
I have a PDF embedded in a web page using the following code:
<object id="pdfviewer" data='test_full.pdf#page=1&toolbar=0&statusbar=0&messages=0&navpanes=0'
type='application/pdf'
width='500px'
height='350px'>
The PDF itself is set to open in full screen mode which shows no controls. The user can advance the slides by clicking on the view.
What I'd like to have is some way to trigger that click so that I can advance 2 similar PDF:s side-by-side (one for the actual slideshow and one for the speaker notes). Is this possible to do in javascript and/or jQuery? I have tried using the click()-method but it doesn't get through to the embedded PDF.
Update: Can't find any info on it, so I guess I'm out of luck and have to try a workaround. Am currently juggling 3 embeds of the same pdf (current page, next page and previous page), hiding and showing them and loading more pages as the user clicks around.
I doubt it. Allowing web page scripts to pass input events to the PDF viewer could be a security risk (since the viewer generally has access to system file dialogues via things like Save As).