instead of javascript to disable right click on iframe links

we have been disabling right select iframe links by using javascript but i would really like to check intended for parent and fill it if it is not present. any strategies. this is with regard to my site online world. studio378d. com. for the time being i have eliminated the javascript that disables the correct click, im trying to eliminate any javascript mind you.

I do not understand what " pay attention to parent" means.
By way of disabling right-click, precisely what purpose was that for
I don’t notice any images i can’t already copy.

lol not any im not protecting anything. if you appropriate click and find open in new window you have just the contents in the iframe without the parent page that has th iframe. thus far we’ve used javascript to disable right click on but thats certainly not exactly cool. i was wondering if there was another way to check for the parent page if your iframe content loads and gives a message as opposed to the contents if the parent is possibly not present. yes i could truthfully use a dynamic div however the effect in several minor areas seriously isn’t desireable, like refreshing parents page for the following just looks foolish and takes longer to load and then just loading the contents is definitely one example of why i dont would like to use dynamic divs for this.

An alternative method is usually to use CSS which has a transparent image. It works similar to this:

01. Determine the size and position of your < iframe>

02. Result in a < div> which covers the location of the iframe
– position: set kept, height, top and width attributes because appropriate
– z-index: some number greater than the z-index for your iframe
– background: url(/path/image. gif)

The default is designed for the transparent image to get positioned at the very best left of the < div> and be repeated under the x and y axes so it covers the full area of the actual < div>. If this is not your default behaviour (perhaps as a consequence of some other style setting) then you will need to set background-repeat explicitly.

The practical effect on this solution is that < iframe> is so visible but none on the content is clickable because of the < div> having a background image incorporates a higher z-index value approach < iframe>.

When you’ve got scrollbars enabled, make sure you set the < div> width and height attributes so as to still get at the scrollbars!

To build a transparent gif file (assuming you might be running Windows), open Paint and result in a single colour graphic. It does not should be very large. Save it being a. gif file then open an image editor just like myimager. com, upload the file in addition to select the transparency choice. (In myimager. com, this is certainly found under Adjust -> Transparent.

Save the at this point transparent file in a proper folder on a person’s webserver and reference it within your < div> attributes.

way about complicated. you dont even need an image to start this, just a translucent div, and im confused how thats likely to stop anyone out of right clicking this link and choosing " open around new… ". thx tho.

people still use windows lmao

I couldn’t complete a transparent < div> work consistently – it lets you do for some browsers and not for others.

If you use a background graphic, right-clicking brings up the ‘Save Picture’ context menu rather then the ‘Open with new window’ menus.

you dont need to make it clear, just fill that hole and depart the div bare. no img definitely not opacity/bg nothing. merely use absolute w/h 100% in addition to z-index.

This entry was posted in Web Design and tagged , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *