Mouseover and print and screen shot

Discussion in 'Javascript' started by bdy120602@gmail.com, May 20, 2008.

  1. Guest

    Is it possible, when a user or viewer of your Web page, prints or
    takes a screen shot of a Web page with mousover (roll-over) text in
    it, to have that text printed or captures as part of the screen shot?
    If so, how?

    Thanks,
    , May 20, 2008
    #1
    1. Advertising

  2. wrote:
    > Is it possible, when a user or viewer of your Web page, prints or
    > takes a screen shot of a Web page with mousover (roll-over) text in
    > it, to have that text printed or captures as part of the screen shot?
    > If so, how?


    Using the pointing device for the rollover and the keyboard for the screen
    shot (Windows: Print oder Alt+Print). I'm not sure about printing, but
    there is a shortcut for this as well (usually Ctrl+P); or they could print
    the screen shot.

    For Firefox, ScreenGrab! provides advanced screen shot options. ScreenGrab!
    is written in JavaScript[tm] and uses Gecko components which might give you
    some idea how to accomplish this in a controlled environment.

    Anything else is not possible with scripting, at least not cross-browser.


    PointedEars
    --
    Use any version of Microsoft Frontpage to create your site.
    (This won't prevent people from viewing your source, but no one
    will want to steal it.)
    -- from <http://www.vortex-webdesign.com/help/hidesource.htm>
    Thomas 'PointedEars' Lahn, May 20, 2008
    #2
    1. Advertising

  3. Guest

    On May 20, 5:08 pm, Thomas 'PointedEars' Lahn <>
    wrote:
    > wrote:
    > > Is it possible, when a user or viewer of your Web page, prints or
    > > takes a screen shot of a Web page with mousover (roll-over) text in
    > > it, to have that text printed or captures as part of the screen shot?
    > > If so, how?

    >
    > Using the pointing device for the rollover and the keyboard for the screen
    > shot (Windows: Print oder Alt+Print).  I'm not sure about printing, but
    > there is a shortcut for this as well (usually Ctrl+P); or they could print
    > the screen shot.
    >
    > For Firefox, ScreenGrab! provides advanced screen shot options.  ScreenGrab!
    > is written in JavaScript[tm] and uses Gecko components which might give you
    > some idea how to accomplish this in a controlled environment.
    >
    > Anything else is not possible with scripting, at least not cross-browser.
    >
    > PointedEars
    > --
    > Use any version of Microsoft Frontpage to create your site.
    > (This won't prevent people from viewing your source, but no one
    > will want to steal it.)
    >   -- from <http://www.vortex-webdesign.com/help/hidesource.htm>


    OK, yes, I should have made it clear that I wanted to do it through
    scripting. So, my question is, can I do the aforementioned via script?
    When you say cross-browser, do you mean, for IE but not for Firefox,
    or for Firefox but not for IE, or do you mean not at the script-level?
    Can you set a control for the page to perform an action, which in this
    case would be to make visible the rollover text, when a combination of
    keys are pressed, or when one key is pressed. Say, when someone
    presses "print screen" or ctrl+ p? Thanks

    Thanks,
    , May 20, 2008
    #3
  4. wrote:
    > Thomas 'PointedEars' Lahn wrote:
    >> wrote:
    >>> Is it possible, when a user or viewer of your Web page, prints or
    >>> takes a screen shot of a Web page with mousover (roll-over) text in
    >>> it, to have that text printed or captures as part of the screen shot?
    >>> If so, how?

    >> Using the pointing device for the rollover and the keyboard for the screen
    >> shot (Windows: Print oder Alt+Print). I'm not sure about printing, but
    >> there is a shortcut for this as well (usually Ctrl+P); or they could print
    >> the screen shot.
    >>
    >> For Firefox, ScreenGrab! provides advanced screen shot options. ScreenGrab!
    >> is written in JavaScript[tm] and uses Gecko components which might give you
    >> some idea how to accomplish this in a controlled environment.
    >>
    >> Anything else is not possible with scripting, at least not cross-browser.
    >> [...]

    >
    > OK, yes, I should have made it clear that I wanted to do it through
    > scripting. So, my question is, can I do the aforementioned via script?


    Depends. See above.

    > When you say cross-browser, do you mean, for IE but not for Firefox,
    > or for Firefox but not for IE,


    Yes.

    > or do you mean not at the script-level?


    Scripting alone cannot do it, you can only use it to use an API that can
    do it. Like the Gecko (XPCOM) components I mentioned before. However, they
    are not available from within the sandbox without requesting further privileges.

    > Can you set a control for the page to perform an action, which in this
    > case would be to make visible the rollover text, when a combination of
    > keys are pressed, or when one key is pressed. Say, when someone
    > presses "print screen" or ctrl+ p? Thanks


    It is possible to recognize if PrintScr or Ctrl+P were used in Firefox, and
    Ctrl+P in IE. Then, in the keyboard event listener, you can make the text
    visible. However, for Ctrl+P I suggest you use a print stylesheet instead.

    See e.g. http://www.brain4.de/programmierecke/js/tastatur.php for the test
    case and the source code.

    Please trim your quotes.


    PointedEars
    --
    Prototype.js was written by people who don't know javascript for people
    who don't know javascript. People who don't know javascript are not
    the best source of advice on designing systems that use javascript.
    -- Richard Cornford, cljs, <f806at$ail$1$>
    Thomas 'PointedEars' Lahn, May 20, 2008
    #4
  5. Guest


    > Please trim your quotes.


    When you say trim quotes, do you mean do what I did in this message:
    only using the quote relevant to my post rather than the entire
    previous discussion? I haven't been using discussion groups as a
    resource for a long time and as frequently as one might think, so this
    question is not sarcastic in any way.

    Thanks again for all the info. you've provided
    , May 21, 2008
    #5
  6. wrote:
    >> Please trim your quotes.

    >
    > When you say trim quotes, do you mean do what I did in this message:
    > only using the quote relevant to my post rather than the entire
    > previous discussion?


    Exactly, but while trimming please keep the attribution line. It is
    important for assigning a quoted text to its author, thus making it
    possible even for the casual reader to follow the discussion easily.

    > I haven't been using discussion groups as a resource for a long time
    > and as frequently as one might think, so this question is not sarcastic
    > in any way.


    The FAQ and FAQ Notes of this newsgroup, among other Usenet manuals, provide
    further information regarding this subject:

    http://jibbering.com/faq/#FAQ2_3
    http://www.jibbering.com/faq/faq_notes/clj_posts.html

    I would also like to suggest you either "Subscribe" to this newsgroup in
    Google Groups, allowing you to post under your real name, or to use a
    locally installed newsreader application instead to facilitate this, which
    would provide even more benefits to you and your readers (GG's Web interface
    has a number of nasty bugs and is frequently used by spammers, therefore
    subject to user's filter rules). For the latter, I can recommend Mozilla
    Thunderbird (which I am using now) or KNode (which I have used before).

    http://getthunderbird.com/
    http://kontact.kde.org/knode/

    > Thanks again for all the info. you've provided


    You are welcome.


    Regards,

    PointedEars
    --
    Anyone who slaps a 'this page is best viewed with Browser X' label on
    a Web page appears to be yearning for the bad old days, before the Web,
    when you had very little chance of reading a document written on another
    computer, another word processor, or another network. -- Tim Berners-Lee
    Thomas 'PointedEars' Lahn, May 21, 2008
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Saish

    screen shot of a page in c#

    Saish, May 31, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    4,123
    gabe garza
    Jun 7, 2005
  2. Ashanen

    screen shot copyright?

    Ashanen, Jan 3, 2004, in forum: Java
    Replies:
    1
    Views:
    380
    Mark Preston
    Jan 5, 2004
  3. Replies:
    1
    Views:
    355
    Betty
    Apr 15, 2005
  4. Davmagic com

    Screen Shot Tool (O/T)

    Davmagic com, Jul 28, 2003, in forum: HTML
    Replies:
    0
    Views:
    409
    Davmagic com
    Jul 28, 2003
  5. gslm
    Replies:
    4
    Views:
    437
Loading...

Share This Page