Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 27th, 2006, 08:02 PM
Registered User
 
Join Date: Apr 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default No RIght Click - IFrame

Hi,

I am having a problem with having an IFrame that simply has a jpg as it's source. i'm trying to disable right click, but no scripts seem to apply to the IFrame. Neither does any of the encrypt software out there.

I have this:
<IFRAME src="nbd_6b_s1.jpg" name=image scrolling=no frameBorder=0 width=255 height=360></IFRAME>

and i've tried disabling right click with html in the body tag and the no-right click software, but it doesn't apply to the IFrame. Any help, direction, ANYTHING would be greatly appreciated.

Thanks,
Liz

Reply With Quote
  #2 (permalink)  
Old April 28th, 2006, 01:46 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: delhi, delhi, India.
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

HI Lizrosenshine!!

you can appliy .oncontextmenu function if you have used the image in the body tag of iframe.
Since you used src="imagefilename" ,i m thinking about the way to solve it for right click.
Offcourse you can detect mouseis on the iframe or not .
Plz visit the link for more info.

http://www.delphifaq.com/faq/f674.shtml
http://www.web-wise-wizard.com/javas...ght-click.html

Hope this will help you


Cheers :)

vinod
Reply With Quote
  #3 (permalink)  
Old April 28th, 2006, 02:15 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: delhi, delhi, India.
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

HI Lizrosenshine!!

Alternate solution is --> Why you are using iframe to just display the image,
rather than use
1> <img> tag in div/span with scroll functionality and apply on
oncontextmenu function as per above link posted with img tag.


I think you can't apply oncontextmenu function dirctly to src="imagefilename.jpg" .

Plz let me know if you other solutions


Cheers :)

vinod
Reply With Quote
  #4 (permalink)  
Old April 28th, 2006, 02:34 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

And why are you trying to disable right-click? It's extremely poor practice and just irritates people as well as insulting their intelligence.
I'm irritated now just thinking about it :)

--

Joe (Microsoft MVP - XML)
Reply With Quote
  #5 (permalink)  
Old April 28th, 2006, 01:37 PM
Registered User
 
Join Date: Apr 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks everybody for your replies!!!

I looked at those links, and that is helpful outside of the IFrame, the reason i am trying to disable right click is because my site is an online boutique, and I invest in photographing and cleaning the images, and I don't want designers, other boutiques, press or anybody taking and posting these images without my permission - it happens too often, and while i know the protection is not fool proof, it does prevent those who are not savvy from taking the images, or at least it deters them to contact me instead! So, not trying to frustrate, just mildly protect.

IFrame is used to allow for images to be swapped from thumbnails presented below - so that one window shows different images.

see www.funkylala.com/Agrigento.htm (then click on any image)...

the code I have specifically is this:
<table width=620 height=21 border=0 cellspacing=0 cellpadding=0>
    <tr>
      <td valign=top width=255>

        <table width=255 height=370 border=0 cellspacing=0 cellpadding=0>
        <tr>
          <td><IFRAME src="gsl_emma01.jpg" name=image scrolling=no frameBorder=0 width=255 height=385></IFRAME></td>
        </tr>
        </table>
<table width=255 border=0 cellspacing=0 cellpadding=0 >
        <tr>
        <td align=center>Select images for other views</td>
        </tr>
        </table>


        <table height=50 border=0 cellspacing=0 cellpadding=8 align=center>
        <tr>
        <td>
               <table border=0 cellspacing=0 cellpadding=1 bgcolor=#B3B2B2>
               <tr>
               <td><a href="gsl_emma02.jpg" target=image><img src="gsl_emma02.jpg" border=0 height=50></a></td>
               </tr>
               </table>
          </td>
         <td>
               <table border=0 cellspacing=0 cellpadding=1 bgcolor=#B3B2B2>
               <tr>
               <td><a href="gsl_emma03.jpg" target=image><img src="gsl_emma03.jpg" border=0 height=50></a></td>
               </tr>
               </table>
          </td>
          <td>
               <table border=0 cellspacing=0 cellpadding=1 bgcolor=#B3B2B2>
               <tr>
               <td><a href="gsl_emma04.jpg" target=image><img src="gsl_emma04.jpg" border=0 height=50></a></td>
               </tr>
               </table>
          </td>
          <td>
               <table border=0 cellspacing=0 cellpadding=1 bgcolor=#B3B2B2>
               <tr>
               <td><a href="gsl_emma01.jpg" target=image><img src="gsl_emma01.jpg" border=0 height=50></a></td>
               </tr>
               </table>
          </td>
          </tr>
         </table>


Thanks again for all the help so far...I'm not sure with this setup if using <img> tag in div/span with scroll functionality and apply on
oncontextmenu function???

Lizzy

Reply With Quote
  #6 (permalink)  
Old May 2nd, 2006, 01:01 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: delhi, delhi, India.
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hii lizrosenshine!!
offcourse you can do it with <img> tag in div/span with full scroll functionatilites
U can also apply context menu function.



Cheers :)

vinod
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to get out from Iframe k.manisha ASP.NET 2.0 Professional 1 September 12th, 2007 12:20 PM
how to prevent page jumping while click on iframe' kathirnk HTML Code Clinic 0 April 16th, 2007 06:39 AM
values from one iframe to another iframe URGENT raaj Beginning PHP 2 February 27th, 2007 12:19 PM
iFrame fyp4135 ASP.NET 2.0 Basics 0 October 5th, 2006 11:32 AM
Right-Click or Double-Click Combobox? panuvin C# 2005 3 June 15th, 2006 04:30 PM



All times are GMT -4. The time now is 01:36 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.