Loading ...
Sorry, an error occurred while loading the content.

Bookmarklet - 'openprintpopup()' how to?

Expand Messages
  • Alec Burgess
    Question: Is it possible to write an openprintpopup() bookmarklet that will open the current page in a free-standing browser window (in Firefox, but maybe it
    Message 1 of 3 , Apr 20, 2009
    • 0 Attachment
      Question: Is it possible to write an openprintpopup() bookmarklet that
      will open the current page in a free-standing browser window (in
      Firefox, but maybe it would also work with IE7 and IE8)? Also useful
      sometimes would be the opensendpopup() but the one I'm really after is
      the openprintpopup.

      When reading longer pages it would be sometimes be nice to be able to
      just click a button on the Bookmarks Toolbar to get the browser window
      w/o any of the chrome (toolbars/status bars etc). I guess there must be
      a java-script expression that returns the URL for the current tab (see
      assignment to var popurl below but haven't yet tried to google for it)

      note: in my installation of Firefox 3 clicking right and middle buttons
      simultaneously toggles chrome display on and off. I *think* support for
      this is provided by one of my many extensions rather than Firefox itself
      but can't remember which it is or how I discovered it. :-)

      see the print article link in this page:
      http://www.theatlantic.com/doc/200904u/us-attorney-bogden

      It contains the following javascript:

      <script>
      <!--
      function openprintpopup(){
      var popurl="/doc/print/200904u/us-attorney-bogden"
      winpops=window.open(popurl,"","width=800,height=480,scrollbars,resizable,")
      }
      function opensendpopup(){
      var popurl="/doc/send/200904u/us-attorney-bogden"
      winpops=window.open(popurl,"","width=600,height=480,scrollbars,resizable,")
      }
      // -->
      </script>

      The html code referencing these two functions is:

      <td>
      <a href="http://www.addthis.com/bookmark.php"
      style="text-decoration:none;"
      onclick="return addthis_open(this, 'email', '[URL]', '[TITLE]');" >
      <img src="/images/site_images/e-mailer.png" alt="email" /></a></td>
      <td><a href="http://www.addthis.com/bookmark.php"
      style="text-decoration:none;"
      onclick="return addthis_open(this, 'email', '[URL]', '[TITLE]');" >E-mail Article</a></td>

      <tr><td><a href="javascript:openprintpopup()"><img src="/images/site_images/printer.png" alt="print" /></a></td>
      <td><a href="javascript:openprintpopup()">Printer Format</a></td>


      --
      Regards ... Alec (buralex@gmail & WinLiveMess - alec.m.burgess@skype)



      [Non-text portions of this message have been removed]
    • loro
      ... document.location.href Lotta
      Message 2 of 3 , Apr 20, 2009
      • 0 Attachment
        Alec Burgess wrote:
        > I guess there must be
        >a java-script expression that returns the URL for the current tab (see
        >assignment to var popurl below but haven't yet tried to google for it)

        document.location.href

        Lotta
      • loro
        ... They look exactly the same to me, only different pages are loaded. Lotta
        Message 3 of 3 , Apr 20, 2009
        • 0 Attachment
          >Also useful
          >sometimes would be the opensendpopup() but the one I'm really after is
          >the openprintpopup.

          They look exactly the same to me, only different pages are loaded.

          Lotta
        Your message has been successfully submitted and would be delivered to recipients shortly.