473,404 Members | 2,195 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Disabling javascript

Hello,

I have a page in which an iframe calls an external website.
I'd like to disable javascript for the page called in the iframe.
Is it possible ? How ?

Thanks in advance,

--
stephan
Nov 5 '05 #1
14 1721
stephan wrote:
Hello,

I have a page in which an iframe calls an external website.
I'd like to disable javascript for the page called in the iframe.
Is it possible ? How ?

No, you can't, but why even try to disable it? If you don't want to use
Javascript, don't put any in the frame or page. Either way, leave my
browser alone. Its mine, not yours.
Nov 5 '05 #2
> No, you can't, but why even try to disable it? If you don't want to use
Javascript, don't put any in the frame or page. Either way, leave my
browser alone. Its mine, not yours.


well... thank you...
In fact, as I said, the called page belongs to another website.
So when the external page is loaded, on some websites, a parent.frame test
triggers an alert on my website :-(
I wanted to disable javascript in order not to bother my users.

--
stephan
Nov 5 '05 #3
stephan said the following on 11/5/2005 12:18 PM:
No, you can't, but why even try to disable it? If you don't want to use
Javascript, don't put any in the frame or page. Either way, leave my
browser alone. Its mine, not yours.

well... thank you...
In fact, as I said, the called page belongs to another website.
So when the external page is loaded, on some websites, a parent.frame test
triggers an alert on my website :-(
I wanted to disable javascript in order not to bother my users.


Stop putting other peoples pages in your frameset and you don't have
that problem anymore.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 5 '05 #4
>
Stop putting other peoples pages in your frameset and you don't have
that problem anymore.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices -

http://www.JavascriptToolbox.com/bestpractices/

Is it a joke ?
I ask you how to do it and you tell not to !
I must say I don't know much about javascript and maybe it's part of the
best practices... if so, I apologize.
Still, you don't you the app I'm coding and the point of my request... so I
understand.
Thanks anyway, I got the answer, it seems to be impossible.
Nov 6 '05 #5
stephan said the following on 11/6/2005 8:37 AM:
Stop putting other peoples pages in your frameset and you don't have
that problem anymore.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices -
http://www.JavascriptToolbox.com/bestpractices/

Is it a joke ?


Is what a joke?
I ask you how to do it and you tell not to !
This is Usenet, not a help desk. You asked how to solve a problem, I
gave you a solution. It wasn't the solution you wanted, but it was a
solution to your problem.
I must say I don't know much about javascript and maybe it's part of the
best practices... if so, I apologize.
It's not listed in there.
Still, you don't you the app I'm coding and the point of my request... so I
understand.
Thanks anyway, I got the answer, it seems to be impossible.


It doesn't "seem" to be impossible. If you are intent on stealing
content from another website, then have your sever retrieve the document
from the other website, strip its scripting, then insert it as your own
page.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 6 '05 #6
> Is what a joke?

The fact a simple help request becomes the trial of a supposed criminal !
I ask you how to do it and you tell not to !
This is Usenet, not a help desk. You asked how to solve a problem, I
gave you a solution. It wasn't the solution you wanted, but it was a
solution to your problem.


It was no solution at all, avoiding a problem is not solving it.
Anyway, thanks for your lessons.
Still, you don't you the app I'm coding and the point of my request... so I understand.
Thanks anyway, I got the answer, it seems to be impossible.


It doesn't "seem" to be impossible. If you are intent on stealing
content from another website, then have your sever retrieve the document
from the other website, strip its scripting, then insert it as your own
page.


I swear I was not trying to steal content from other websites.

Thank you for your answers.

--
stephan
Nov 7 '05 #7
stephan wrote:
No, you can't, but why even try to disable it? If you don't want to use
Javascript, don't put any in the frame or page. Either way, leave my
browser alone. Its mine, not yours.


well... thank you...
In fact, as I said, the called page belongs to another website.
So when the external page is loaded, on some websites, a parent.frame test
triggers an alert on my website :-(
I wanted to disable javascript in order not to bother my users.

Stephan, I appreciate your problem and I hope you appreciate the
solution... and it is a solution.

First, if you don't want Javascript then don't use it.

Second, if you don't want a third-party page to use Javascript then
arrange with the third party to remove it. If the third party will not
do so then your page should not include theirs... you *do* have their
permission to use it, I presume?

Third, in the admittedly highly unlikely event that you *do* have their
permission to use the page, that they will *not* remove the Javascript
and that they *do* permit you to remove it from your version of their
page then instead of using a frame you should set up a <div> layer
rather than a frame, load their content using XmlHttpRequest, remove the
<script> tags and content and display it in your layer.
Nov 7 '05 #8
The Magpie said the following on 11/7/2005 3:48 PM:
stephan wrote:
No, you can't, but why even try to disable it? If you don't want to use
Javascript, don't put any in the frame or page. Either way, leave my
browser alone. Its mine, not yours.

well... thank you...
In fact, as I said, the called page belongs to another website.
So when the external page is loaded, on some websites, a parent.frame
test
triggers an alert on my website :-(
I wanted to disable javascript in order not to bother my users.

Stephan, I appreciate your problem and I hope you appreciate the
solution... and it is a solution.

First, if you don't want Javascript then don't use it.

Second, if you don't want a third-party page to use Javascript then
arrange with the third party to remove it. If the third party will not
do so then your page should not include theirs... you *do* have their
permission to use it, I presume?

Third, in the admittedly highly unlikely event that you *do* have their
permission to use the page, that they will *not* remove the Javascript
and that they *do* permit you to remove it from your version of their
page then instead of using a frame you should set up a <div> layer
rather than a frame, load their content using XmlHttpRequest, remove the
<script> tags and content and display it in your layer.


Have you tried loading a document using XMLHTTPRequest from a different
domain when the page is loaded from a server? You get a security
warning. Script can't access a page outside it's own domain.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 7 '05 #9
stephan said the following on 11/7/2005 4:19 AM:
Is what a joke?

The fact a simple help request becomes the trial of a supposed criminal !


This is no trial, and you are the only that supposed yourself to be a
criminal. But it is a well known phenomenon on the web that sites try to
steal content from other sites by putting it in a frameset with a hidden
frame. If you do not fall into that category, then you have nothing to
worry about.
I ask you how to do it and you tell not to !
This is Usenet, not a help desk. You asked how to solve a problem, I
gave you a solution. It wasn't the solution you wanted, but it was a
solution to your problem.

It was no solution at all, avoiding a problem is not solving it.


The reason you got the solution you got is because there is no way, with
client side javascript, to do what you are wanting to do. It's a
security violation.
Anyway, thanks for your lessons.

Still, you don't you the app I'm coding and the point of my request...
so I understand.
Then explain what your app is.
Thanks anyway, I got the answer, it seems to be impossible.

It doesn't "seem" to be impossible. If you are intent on stealing
content from another website, then have your sever retrieve the document
from the other website, strip its scripting, then insert it as your own
page.

I swear I was not trying to steal content from other websites.


Fair enough. Set up a script on your server that will retrieve the
document, remove the script elements, and then display it with a URL
from your page. But without expressed permission of the outside site,
that does fall into the stealing content category.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 7 '05 #10
Randy Webb wrote:

Have you tried loading a document using XMLHTTPRequest from a different
domain when the page is loaded from a server? You get a security
warning. Script can't access a page outside it's own domain.


I did note, if you recall, that all that was assuming the OP had
permission and presumed that with that permission would go the security
measures needed to get the page.
Nov 8 '05 #11
Lee
The Magpie said:

Randy Webb wrote:

Have you tried loading a document using XMLHTTPRequest from a different
domain when the page is loaded from a server? You get a security
warning. Script can't access a page outside it's own domain.


I did note, if you recall, that all that was assuming the OP had
permission and presumed that with that permission would go the security
measures needed to get the page.


Those are two completely different issues. The author having permission
to use the page is not going to change the security settings on each
individual visitor's browser.

Nov 8 '05 #12
The Magpie said the following on 11/8/2005 8:57 AM:
Randy Webb wrote:

Have you tried loading a document using XMLHTTPRequest from a
different domain when the page is loaded from a server? You get a
security warning. Script can't access a page outside it's own domain.


I did note, if you recall, that all that was assuming the OP had
permission and presumed that with that permission would go the security
measures needed to get the page.


Even assuming that I give you permission to use a page of mine, unless
you load it from the server and pass it to the page, client-side
javascript has no way to read the actual file. See my other reply today
and it becomes easier to understand why you can't. Its a security issue.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 8 '05 #13
Well there's no Javascript answer that I can think of... However if you're also using a server side language like JSP or Perl CGI
you could access the page from there, put it in a buffer, stripe the Javascript, then send it out to the browser as part of the page
your displaying without an IFrame.

Just some thoughts...

Dennis

stephan wrote:
Hello,

I have a page in which an iframe calls an external website.
I'd like to disable javascript for the page called in the iframe.
Is it possible ? How ?

Thanks in advance,

--
stephan

Nov 9 '05 #14
Lee wrote:
The Magpie said:
Randy Webb wrote:
Have you tried loading a document using XMLHTTPRequest from a different
domain when the page is loaded from a server? You get a security
warning. Script can't access a page outside it's own domain.


I did note, if you recall, that all that was assuming the OP had
permission and presumed that with that permission would go the security
measures needed to get the page.


Those are two completely different issues. The author having permission
to use the page is not going to change the security settings on each
individual visitor's browser.


Fair point. I made assumptions I shouldn't have.
Nov 9 '05 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Ralph Freshour | last post by:
How can I disable a button once it has been clicked? I want to prevent the user from clicking on it twice if they have a slow connection. Thanks...
3
by: Russell McDade | last post by:
I have a html page that I don't want anyone to print. Is there a way using JavaScript to send an alert to the user to warn them from trying to print the html page? Is there an onPrint event...
22
by: Papajo | last post by:
This simple script counts up or down with a button click, now can it be modified so the count won't go below zero?            Thanks, Joe <form> <input type=text name=amount size=4 value=>...
6
by: ML.Steve | last post by:
Hi, There are lots of posts on this subject but after a couple of hours of going though them I still can't get a number of fields to be disabled when a checkbox is ticked. Basically I have a...
2
by: Jeelz | last post by:
Hi Guyz, Would appriciate any tip on disabling an ASP.NET LinkButton using client sided code like javascript. My Requirement is such that the user should be allowed to click on the link...
3
by: PB | last post by:
What is the rationalle for disabling JavaScript. AFAIK, the primary reason is for "security purposes" - but what specific kind of threats does the protect against? AND - is the disabling of...
7
by: John Meyer | last post by:
I have a program where I have to enable or disable a list box based upon a radio button. Is there an "enabled" property on select boxes?
1
by: kebabkongen | last post by:
Hi, I'm working on a JavaScript that is enabling / disabling a select element according to whether a checkbox is selected or not. This works fine in Firefox, but in Internet Explorer (v 6.0.2900)...
3
by: ChrisN | last post by:
Invoking a postback before a large ASP.NET page has fully rendered will often cause the page to crash. This is unhelpful and confusing to users. I'm wondering if I can overcome this by...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.