L
L
linklee2015-10-04 14:21:05
In contact with
linklee, 2015-10-04 14:21:05

Vk api handle keystrokes in an iframe application?

Look, I have an iframe application, relatively speaking, an RPG game, and I need the little man to move along the arrows, but the page scrolls along with the movement of the unit on the down arrow.
I do like this:

window.focus();
$('window').keydown(function(event){
            event.preventDefault();
            event.stopPropagation()
 });

How to prevent page scrolling?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
Kirill, 2015-10-09
@skv1991

Set the iframe (let's say id = myIframeId ) to a fixed size, set the css property
#myIframeId { overflow:hidden; }.
In general, as far as I know, if from the outside, then access to the contents of the iframe cannot be obtained.
Only and here VK Api?

M
madmaxcorp, 2012-01-29
@madmaxcorp

Usually, only the text of what is on the page remains in the printed version. There should not be any elements such as navigation, banners and advertising and other blocks. Pictures that relate directly to the post can be left.
On a "regular narrative site", in principle, you can print out contact details, if any. If there are any articles, then it would not hurt either. In general, it depends on the direction of the site.
I won’t say anything about statistics, we usually do it if the client needs it.

A
Alx, 2012-01-29
@gx2

And who knows why the “printable version” was removed from Habr?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question