This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Bitmap Iframe

Fedor,

This has to do with the disable right click function. When I use that code on the AJAX control now it sets focus to the iframe. I have other code that prevents them from pressing any keys on the keyboard to copy or steal images. This code becomes disabled because the right click function sets focus to the iframe. Then my window.close() function on the page no longer works. With the web control I did not have this problem. I have a suggestion for development is there a way to turn the iframe on or off? If you can give me another suggestion about my onkeydown event that would help greatly.

Thanks

Chris
Hello Chris,

The problem is not in focus, but in context (current object, current window) of JavaScript.

Instead of window.close(), which works different way in iframe and main window, you can use window.top.close(). Using window.top you get reference to the main window.
Fedor,

Sending you a sample please use IE for your browser type. I tried the top close it does not work either.
No license file included 🙂

Thanks

Chris

Attachments

Fedor,

I figured it out. I needed to add this line on the formload window.frames[BitmapViwer1"].document.onkeydown = CloseWindow;

Please look at my sample it is a new javascript for a silent no alert message. It works on the form but does not work on the iframe. Any suggestions would be good.

I had to put the alert in the function to make this disable the context menu at all if you take the alert out it still works on the form but not on the iframe.

Thanks

Chris
Hello Chris,

Sorry for long delay.

I attached the updated source code that disables context menu. Please, try it out.