Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
Chris Herrington  
#1 Posted : Monday, May 4, 2009 10:28:33 PM(UTC)
Chris Herrington

Rank: Advanced Member

Groups: Member
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
Fedor  
#2 Posted : Monday, May 4, 2009 10:45:17 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,558

Thanks: 5 times
Was thanked: 62 time(s) in 61 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
Chris Herrington  
#3 Posted : Monday, May 4, 2009 11:22:14 PM(UTC)
Chris Herrington

Rank: Advanced Member

Groups: Member
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
File Attachment(s):
AurigmaTest.zip (3,311kb) downloaded 3 time(s).
Chris Herrington  
#4 Posted : Monday, May 4, 2009 11:30:47 PM(UTC)
Chris Herrington

Rank: Advanced Member

Groups: Member
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
Dmitry  
#5 Posted : Sunday, May 24, 2009 3:55:17 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
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.
File Attachment(s):
AurigmaTest[edited].zip (1,652kb) downloaded 3 time(s).
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
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.