...

View Full Version : Disable JavaScript for frame only?



fuzzy1
01-08-2007, 04:03 PM
Hey All,
I'm working on a little frames based web market research tool (not for public consumption) which allows us select various supplier websites via a link in a header frame, to be loaded in a main frame, from which we may drag data to be dropped into a form in a third form_frame which then submits to our database. All in all, this works nicely until we come to one of the supplier sites which has implemented a frame-killer script. Hmmm.

Now, I know it would be bad form (probably illiegal even) to force a site into the frames of another site for public consumption but I don't think that is an issue here so I ask you all ...

Is it possible to disable JavaScript (on the fly) for a given frame only?

Philip M
01-08-2007, 04:38 PM
"All in all, this works nicely until we come to one of the supplier sites which has implemented a frame-killer script."

That's because he doesn't want you to do what you are proposing.

"Is it possible to disable JavaScript (on the fly) for a given frame only?"
As far as I know, no, not possible.

felgall
01-08-2007, 09:42 PM
Simplest way to "disable" javascript for a page displayed in a specific frame is to NOT put any Javascript in the page that is to go in that frame or to change the javascript in that page so that it only runs if the page isn't displayed in your frame. As Javascript cannot access pages from a different domain that are displayed in a frame in your page you can't do anything with Javascript unless both the page creating the frame and the page displayed in the frame are both on your site anyway. If you display someone else's page in your frame then any Javascript that they have in that page will run and there is nothing whatever you can do about it unless you can get them to change the code.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum