I need to be able to automatically turn off javascript on certain parts of my site so that when I'm using a frame to look at another site the javascript is disabled. Is there a way to do this like they do with web proxies on proxy.org? thanks
I need to be able to automatically turn off javascript on certain parts of my site so that when I'm using a frame to look at another site the javascript is disabled. Is there a way to do this like they do with web proxies on proxy.org? thanks
you cant control the content of other sites. if you could, the web would be in anarchy. and using javascript to disable javascript is retar... redundant. the sites can use javascript to break out of frames.
sorry, but its impossible.
well then how do web proxies do it
Web Proxies are able to disable javascript because they are coded by PHP which downloads the webpage and can edit the html anyway they feel possible before displaying to the browser. I would guess they make the proxy add "<noscript> tags around the entire contents of the webpage.
I also want to do the same like I m getting some one site and want that javascript add not shown on my site but did not get its solution first
The only way to do this is to use php (or another serverside language) to get the contents of a remote page. This is nothing like iframes-- this is your server getting the files from another server, then forwarding them to you. That's how a proxy works.
But then you want to actually modify the contents of those pages. That's possible and in theory simple-- get the contents in PHP (etc) then search and replace any parts you don't like. For example, you could try to remove all <script..... tag blocks.
Will it work? Perhaps. Will it be easy to guess at what sort of content may or may not be on another site? No, not at all.
There is no standard "way" for this because there is no real "solution", but instead just ways to attempt to make it work.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Bookmarks