optikalefx Posted December 11, 2007 Share Posted December 11, 2007 Hey guys, i was wondering if anyone has ideas on how to load webpages inside a div. And moreover, how to scale the content to the constraints of the div. For example, there is a javascript demo on dynamic drive, but those file have to be local for it to work, also in example on my ipod Touch safari scales webpages to fit its screen, i kind of want to mimic that action in a div, scale the site down. Quote Link to comment Share on other sites More sharing options...
therealwesfoster Posted December 11, 2007 Share Posted December 11, 2007 You could use iframes.. that would work Quote Link to comment Share on other sites More sharing options...
optikalefx Posted December 11, 2007 Author Share Posted December 11, 2007 ok, but can you dynamically change the size of the iframe? Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted December 11, 2007 Share Posted December 11, 2007 you need to use either AJAX/PHP (or alternate sever side language) or just plan PHP (or alternate sever side language) to get the content dynamically in a div. to make the content fit to your div; set your div's overflow style to either auto or scroll. Quote Link to comment Share on other sites More sharing options...
optikalefx Posted December 11, 2007 Author Share Posted December 11, 2007 No way to scale the content? I cant use anything but Javascript. Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted December 11, 2007 Share Posted December 11, 2007 your not going to be able to load a web page's content in a div without a server side language and javascript working together. about the only option you have is going with the iframe in the div. Quote Link to comment Share on other sites More sharing options...
optikalefx Posted December 11, 2007 Author Share Posted December 11, 2007 ok, then is there anyway to mock screen cap a website, and save it as a thumbnail image? that would give me the same effect. I was looking at the <canvas> tag for some logic on this. Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted December 11, 2007 Share Posted December 11, 2007 ok, then is there anyway to mock screen cap a website, and save it as a thumbnail image? that would give me the same effect. I was looking at the <canvas> tag for some logic on this. what? Quote Link to comment Share on other sites More sharing options...
optikalefx Posted December 12, 2007 Author Share Posted December 12, 2007 my goal is to have mini divs that i can drag around the screen, and the divs are thumbnails of websites. but they are updated when a website is updated, so it would need to "screenshot" a website and then generate a thumbnail. this is difficult Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted December 12, 2007 Share Posted December 12, 2007 best I can tell you is - "Google It". your going to have to have a server side language to create a dynamic screen shots; unless you use static images and that will not automatically change if the site is updated. Quote Link to comment Share on other sites More sharing options...
BenInBlack Posted December 12, 2007 Share Posted December 12, 2007 i found these links http://brad.livejournal.com/2015327.html http://khtml2png.sourceforge.net/ Quote Link to comment Share on other sites More sharing options...
optikalefx Posted December 12, 2007 Author Share Posted December 12, 2007 my server is down i cant test at the moment, but is that first one purly php? where does it save to? Quote Link to comment Share on other sites More sharing options...
BenInBlack Posted December 12, 2007 Share Posted December 12, 2007 these are server side processes like phpQuestioner was referring to, they use command lines to call browser rendering engines and then send the output of browser to like imagemagick to thumbnail it. it the first case they are using vncserver which is stock on Linux server Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.