Results 1 to 6 of 6

Thread: Disabling javascript automatically on my site

  1. #1
    Join Date
    Feb 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Disabling javascript automatically on my site

    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

  2. #2
    Join Date
    Jun 2006
    Location
    Acton Ontario Canada.
    Posts
    677
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    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.
    - Ryan "Boxxertrumps" Trumpa
    Come back once it validates: HTML, CSS, JS.

  3. #3
    Join Date
    Feb 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    well then how do web proxies do it

  4. #4
    Join Date
    Jan 2007
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

  5. #5
    Join Date
    Jul 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •