My thought is that it would grab the HTML only when the link button was pressed so there would be very little page-size overhead.
The Javascript function on the "print" button would find the right DOM element, probably grab its .outerHTML property, and encode that HTML chunk to include in the mailto: link. It would probably also have to insert some CSS and JS references and maybe even the meta viewport tag... and then invoke the mailto: link it has created. If anyone gets this working, please post some code. On Jul 30, 6:23 pm, Jerrod Hofferth <[EMAIL PROTECTED]> wrote: > Is there a good way to do this without effectively doubling the size > of your page by dumping a duplicate copy into a link? > > On Jul 30, 4:41 pm, Randy <[EMAIL PROTECTED]> wrote: > > > Sometimes it would be nice to be able to print or otherwise capture a > > screen from an iPhone app. > > > It occurred to me that, using the HTML mailto capability (described > > athttp://www.iphonewebdev.com/examples/mailto.html), it might be > > possible to permit iUI-based apps (as well as others) to "print" by > > having the print button link look roughly like this: > > > mailto:?subject=Hello&body=<div {size-constraints}>...{screen- > > contents}...</div> > > > where screen-contents would be the DOM HTML for whatever element makes > > the most sense in iUI. The div would have to be constrained to fixed > > width, but as a bonus it could be rotation-sensing. The user can > > select any email address in their contact list. > > > If this all works, this would permit the user to then print the iPhone > > web app screen from any HTML-compliant email client, as long as the > > enclosed HTML was supported by the HTML rendering engine for their > > email client. > > > I have not had a chance to try this out, but I throw it out for > > discussion. > > > Thanks, > > -Randy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/iphonewebdev?hl=en -~----------~----~----~----~------~----~------~--~---
