Rank: Advanced Member
Groups: Guest
Joined: 9/6/2005(UTC) Posts: 106
|
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
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 7/28/2003(UTC) Posts: 1,660
Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
|
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. |
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 9/6/2005(UTC) Posts: 106
|
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
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 9/6/2005(UTC) Posts: 106
|
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
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 8/3/2003(UTC) Posts: 1,070
Thanks: 1 times Was thanked: 12 time(s) in 12 post(s)
|
Hello Chris, Sorry for long delay. I attached the updated source code that disables context menu. Please, try it out. |
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.