sandeep226
asked on
How to disable clicking inside an IFRAME where the content is loaded from an external domain?
Hello,
I got a website with frames.
The main frame contains two frames 'top' and 'bottom'.
Now I have an IFRAME inside the bottom frame. And it is linked to an external website. However, I wish to disable clicking on any of its links (both right and left) inside the Iframe. Could you please tell me the code to do so.
Ps: I am an utter newbie to webpage development or programming.
I got a website with frames.
The main frame contains two frames 'top' and 'bottom'.
Now I have an IFRAME inside the bottom frame. And it is linked to an external website. However, I wish to disable clicking on any of its links (both right and left) inside the Iframe. Could you please tell me the code to do so.
Ps: I am an utter newbie to webpage development or programming.
you cant without some mad code
ASKER
Yes, and i am looking for one! :)
What the meaning for external website?
If it's in different domain, for browse security, you cannot access the frame, you will get "Access is denied" when Scripting Across Frames.
To Create Cross-Frame Scripting-Capable Web Pages with HTML Applications (HTAs)
http://support.microsoft.com/default.aspx?scid=kb;en-us;241754
If it's in different domain, for browse security, you cannot access the frame, you will get "Access is denied" when Scripting Across Frames.
To Create Cross-Frame Scripting-Capable Web Pages with HTML Applications (HTAs)
http://support.microsoft.com/default.aspx?scid=kb;en-us;241754
ASKER
yes it is from a different domain. And there are quite a few scripts online that display content from an external domain.
However, what i want is that none of the links on the external page be clickked.
However, what i want is that none of the links on the external page be clickked.
Load the page though your server and display an image generated of the site or change all links to text.
Beware of copyright issues.
Beware of copyright issues.
ASKER
Hi mplungjan, could you tell me the script. I am new to programming. thanks.
ASKER
mplungjan, i think what you are telling is exactly what i am looking for. Could you please elaborate. Thanks.
You need a server process.
For example using php or asp
then you can do
<iframe="myserverprocess.p hp?page=ht tp%3A//www.cnn.com">< /iframe>
then in the myserverprocess.php you need to find all links - look for href and onClick and location.
and change them all to myserverprocess.php?page=w hatever
or # for example.
Alternatively you can run a browser on your server and take a snapshot with some server software..
I need more information on what you want and what your server can do and what YOU can do with server coding...
Michel
For example using php or asp
then you can do
<iframe="myserverprocess.p
then in the myserverprocess.php you need to find all links - look for href and onClick and location.
and change them all to myserverprocess.php?page=w
or # for example.
Alternatively you can run a browser on your server and take a snapshot with some server software..
I need more information on what you want and what your server can do and what YOU can do with server coding...
Michel
ASKER
Hi,
am creating something in normal html. frankly, i have no idea of php or asp. but have some idea of html, javascripts too.. to an extent. so i was hoping that using the basic html stuff, i can create an iframe of a page - no copyright issues.
The only criteria is, that no one should click on a single link on that page. Something like capturing a live screenshot of a page and posting it. Thats it.
Thanks once again!
am creating something in normal html. frankly, i have no idea of php or asp. but have some idea of html, javascripts too.. to an extent. so i was hoping that using the basic html stuff, i can create an iframe of a page - no copyright issues.
The only criteria is, that no one should click on a single link on that page. Something like capturing a live screenshot of a page and posting it. Thats it.
Thanks once again!
If the user will let you, you can get the page using xmlhttp and change the links then. But the user must allow external pages to be grabbed
Have a search for xmlhttp
Michel
Have a search for xmlhttp
Michel
ASKER
Hi, th user is allowing me to grab the page?
as usual i did not understand what is xmlhttp. But will find out on the net.
I cam across http://www.thumbshots.org. Seems to be what i am looking for. Let me try.
Thanks for ur help!
as usual i did not understand what is xmlhttp. But will find out on the net.
I cam across http://www.thumbshots.org. Seems to be what i am looking for. Let me try.
Thanks for ur help!
Hi, sandeep
I have two question about you Iframe is (1) fixed size and (2) no scrollbar?
I have two question about you Iframe is (1) fixed size and (2) no scrollbar?
ASKER
hi, so i give up on thumbshots as an answer.
that is not what i am looking for.
can someone give me a simple code that will fit say, as an example, google.com in an ordinary html page - tucked inside a cell onto the right hand side of the page. with no one being able to click on it or search from it. But the site ought to be visible.
It preferrably should be of a fixed dimension and no scrollbar.
That's it... frankly
that is not what i am looking for.
can someone give me a simple code that will fit say, as an example, google.com in an ordinary html page - tucked inside a cell onto the right hand side of the page. with no one being able to click on it or search from it. But the site ought to be visible.
It preferrably should be of a fixed dimension and no scrollbar.
That's it... frankly
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Bravo. I was thinking of that but was sure it would not be possible for some reason.
Actually loading CNN into that frame gives a LOT of errors and if it had a frame breaker script, the page would of course not stay in the iframe
Actually loading CNN into that frame gives a LOT of errors and if it had a frame breaker script, the page would of course not stay in the iframe
ASKER
great. I will implement the same and comment on it by tomorrow. it is almost 1am in india now! Thanks for all the help mplungjan!
ASKER
Hello Michel,
U've done it my friend!
Am increasing the points for you from 125 to 500. Let me test it.. Just a little problem with the gif image creation.....
Thanks a million buddy! Thanks!
U've done it my friend!
Am increasing the points for you from 125 to 500. Let me test it.. Just a little problem with the gif image creation.....
Thanks a million buddy! Thanks!
ASKER
The points are yours... and all worth it!!
Great job!
Thanks, and until the next problem....
Great job!
Thanks, and until the next problem....
ASKER
Woops... i almost made a mistake there... all those thanks and praise are for bubbledragon!
good you noticed in time :)
ASKER
I need the page being rendered inside the IFRAME to have a plastic like feeling. No right or leftt click. Only view the page. That's it.
PS: I am new to javascripts or webpage development. So please try to give answers as if answering to a newbie! Thanks!