Disable JavaScript For Frame Only?
Jan 8, 2007
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.
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?
View 2 Replies
ADVERTISEMENT
Mar 20, 2006
I have a top-bottomLeft-bottomRight frameset and three pages (details01.html, details02.html and details03.html):
<frameset rows="80,*" cols="*" frameborder="no" border="0" framespacing="0">
View 5 Replies
View Related
Jul 23, 2005
I have two frames. "Top" contains a local file on my server with the aforementioned javascript. "Bottom" is a remote website on a server I do not control. I want to use javascript in "Top" to determine what the current url is in the "bottom" frame...
View 1 Replies
View Related
Jul 23, 2005
Can someone show me how I can have:
<a href="javascript:history.back()" name="Back" value="Back"
style=width:40px;float:right;margin-left:0px class="button" >Back</a>
but since this href exists in a frame, it only pertains to this frame?
View 4 Replies
View Related
Oct 28, 2003
I have set of frames... one contains a menu and the other a status frame. I am calling a function from the menu which sets the variables however I need some help passing those variables to the status frame. How would I go about doing such a thing?
This is called from the menu in frame 1 but doesn't work:
Code:
function jumpsec(cat, prod) {
parent.statusbar.category=cat;
parent.statusbar.product=prod;
}
// then my status frame bar has:
document.write(parent.statusbar.category);
document.write(parent.statusbar.product);
The 2 variables are blank on statusbar onload but get populated with each click.
View 4 Replies
View Related
Dec 16, 2006
I have an outer page and an inner iframe. The outer page calculates some
javascript, and wants the inner frame to run it. The inner frame should hit
a page on the same (private) web server, so this is not a cross-site
scripting attack. But I would prefer not to taint the target page with any
extra logic to do this. (I will if I must.)
The calling page has these elements:
<script src="/javascripts/prototype.js" type="text/javascript" />...
<span id='update_me'>yo2</span>
<iframe id='grinder' src='sample.html' >
</iframe>
So here's most of the page which the iframe hits:
<script src="/javascripts/prototype.js" type="text/javascript" />...
<body bgcolor='silver'>
<span id='update_me'>yo</span>
</body></html>
Note that both the outer and inner page have a span with the same ID.
This question will resemble a JavaScript FAQ - how to evaluate Javascript on
the fly, or how to reload a JS file. The answers on the web generally do not
transport the JS across a frame boundary, so they don't address the bug I
encountered, and I can't tell if prototype.js or IE is at fault.
The outer page calls Ajax goodies that generate some JS looking like this:
Element.update("update_me", "here I B");
The page sends that, as a string, into this JS (in application.js):
function update_grinder(sauce)
{
var grinder = $('grinder');
if (grinder)
{
var doc = grinder.contentDocument;
if (!doc) doc = grinder.document;
if (doc)
{
evaluate(doc, sauce);
return;
}
}
document.write("your browser sucks");
}
So that contains enough logic to find the iframe's document, and it works
for Firefox, IE, Konqueror, and Opera. The code calls evaluate() with the
document where we need the evaluation context, and the string with our
source.
Here's evaluate():
function evaluate(doc, sauce)
{
var s = doc.createElement('script');
//s.defer = true; // <-- no effect
s.text = sauce;
var body = doc.getElementsByTagName('body').item(0);
if (body)
{
body.appendChild(s);
return;
}
body = doc.body;
if (body)
{
body.appendChild(s);
return;
}
}
That creates a <scriptblock, sticks our string in as its contents, and
pushes the block to the end of our <bodytag. Now here's the bug:
Firefox updates the inner <span id='update_me'>, and IE updates the outer
one.
If I remove the outer <span id='update_me'>, then IE simply can't find it
and throws an error. Even though it evaluates a script block clearly in the
context of the inner iframe.
I have tried calling the script from setTimeout, and from a button's onclick
handler.
Is there some script.aculo.us way to fix (yet another) bug in IE? Or is this
a bug in prototype.js?
View 15 Replies
View Related
Jul 20, 2005
I want to stream audio into a hidden frame and load, stop, and control
volume via JavaScript. I'm thinking w/ Windows Media Player.
View 2 Replies
View Related
Jul 20, 2005
I want to test/proof some <NOSCRIPT></NOSCRIPT> stuff in my page via PHP but can not figure how to disable JavaScript on my browser.
View 2 Replies
View Related
Jul 23, 2005
I have a form, with two drop down boxes. I want to be able to disable
the second drop down box when a specific value is chosen on the first.
I can't seem to figure out how to do this.
Go easy on me, I'm a newbie for the most part, but here is my code...
View 4 Replies
View Related
Dec 20, 2005
Does anyone know how to disable javascript in the new Netscape 8 -- for
off line testing (like can be done readily with the current MSIE,
Firefox or Opera browsers) ?
When I try tools -> options -> site controls -> web features and check
or uncheck the 'enable javascript' box, nothing changes -- it stays
enabled.
I've searched FAQs, archives and google about the issue, with no luck.
The odd thing is I swear last summer I managed past the problem
intermittently by clearing the cache, restarting the program, rebooting
the system, or something like that . . . but then got busy with other
things and now I don't recall what I did -- or if I was dreaming.
If no-one else can disable javascript on NN8, then why worry? I don't
know -- to be thorough, I guess. Would a third party security program
'disable javascript' feature be a way to test NN8 under these
circumstances? Or maybe it's the case that the 'disable javascript'
controls in NN8 work only for online content (the reverse of the MSIE
controls). I'll check it out and report back.
View 1 Replies
View Related
Mar 15, 2006
I want to know, is there any other methods other than history.forward(), to disable back operation in HTML using javascript.
View 1 Replies
View Related
Apr 12, 2006
If the browser disable the javascript, what happen to Ajax? can i slove
the problem by using server side script? any suggestion for this?
i currently do some dirty projects with perl/cgi, and I would like to
add more client side features which relate to ajax, and do some
validation on the client side with javascript. but it is possible that
the javascript may be disable with some browsers. what can i do if the
client's broweer disable the javascript.
View 8 Replies
View Related
Jun 13, 2006
I want to disable a table with javascript. In this table i have 'n' record and each record has 3 buttons. If you click a button does an action. I want to disable the all table.
Is there any way to disable all this table without have to disable each
button of each record?
View 8 Replies
View Related
Jun 14, 2006
Is there anyway of disabling images in javascript, so that the alternative
text appears instead of the images? I'm trying to do a text-only version of my site.
View 8 Replies
View Related
Oct 10, 2006
Does anyone know how to disable selecting when drawing VML objects? I
have a sketchpad program, where I draw polylines when you do a mouse
drag. The problem is that when i drag the mouse, it is drawing the line
but also selecting the previous VML stuff, which is sort of annoying.
Is there a way to disable this in javascript?
View 1 Replies
View Related
May 11, 2004
I have a form in which I disable the backspace key from going back a page if typed.
It works in IE I can disable the backspace key from going back but not in mozilla. Does anyone know why this does not work in mozilla?
<body onkeydown="if (event.keyCode==8) {event.keyCode=0; return event.keyCode }">
View 20 Replies
View Related
Feb 7, 2011
I have a requirement like this
1) I have some code in JavaScript
2) When ever it runs automatically Yellow colored Pop-Up Information Bar ll appears
3) Now i want to completely disable that information bar
4) If i runs that Html file it should be automatically allows ActiveX control pop-up and load all events
View 1 Replies
View Related
Aug 26, 2011
I have a domain: example.com; which is the parent.And a subdomain: api.example.com; which page 'receiver.html' is being loaded in an iframe, child of parent. Both pages set document.domain = example.com.
I'm trying to adapt this code:[url] but Idon't want to load jQuery from the <iframe> again but I need to have the method $.ajax() working from the <iframe> otherwise it would be a cross-domain request and the browser would abort it. I tried ingenuously to set via $('iframe')[0].contentWindow.$.ajax = $.ajax() and I just got a shortcut to the parent page jQuery method. I also tried to "clone" it using $.expand (true...) but the method doesn't work for me; probably because of the complexity of the objected I'm trying to clone. So is there a way for me to use jQuery to have only a $.ajax() method in the <iframe> ? I've thought even about creating a XHR in the child-iframe and then use that in the $.ajaxSetup ({xhr: THATNEWXHR}) but I couldn't do it. I mean, I want to use the XHR factory from jQuery (which has fallbacks for IE, etc) but it has to be created from the iframe-child.
Maybe there is other way to make the AJAX call come from the child-iframe.
If you're wondering "why don't you load jQuery from <script> in the child-iframe", there is a reason... As I'm using jQuery plugins + my own custom javascripts + other independent scripts I created a compiler which minifies each file and bundle them in one. The advantage of this is the reduction of HTTP requests. So "why don't you load that bundle inside the child-iframe?", because it's ugly and Twitter doesn't... Yeah, I like to take Twitter as a reference and I think if they were able to make it so can I;
I got to work in most browsers except IE and Operaby doing it with pure javascript.
I'm "attaching" the code for you guys to test. If you open it with Chrome, Safari or Firefox you will receive 2 alerts one with the return of $.get() and another with the return of a request made via XMLHttpsRequest object. Otherwise (if you open it with IE or Opera) you'll get 'undefined' in the first alert but the real return in the second.
This is the example.com/index.htm:
View 4 Replies
View Related
Oct 15, 2001
Im trying to make a back button that reloads the previous page the user was at.
The back button will be on a small top frame and the page that needs to be controlled will be in the main frame.
The top frame is just a navigation system, and all pages will be loaded in the main frame.
Im trying to use this Code:
<FORM>
<INPUT TYPE="button"
NAME="back"
VALUE="BACK"
onClick="history.go(-1)">
</FORM>
Does anyone know how I could accoplish the desired result using this code, or any other code? And what about a foreward button?
View 2 Replies
View Related
Feb 17, 2007
a traditional javascript usage such as
<a href="javascript:void(0)"
or
<a href="javascript:doSomething()"
will both show the javascript link on the browser status bar...of
course you can use onmouseover to set the status bar text...but you
need to do on all the link....a little over kill.
View 4 Replies
View Related
Jul 20, 2010
I want to have a main image in place and when you click on 1 of the 3 frame options the frame changes showing a preview. Also I would like the add to cart button change its code to add the correct item as well.
View 2 Replies
View Related
Oct 11, 2006
Most of the browsers has a feature that prompts the user to save the username or password when filling a form.
I just want to disable this feature. Can i disable this feature using Javascript?
Because there are some users that will not read on the message or information on the pop window that prompts them to save the username and password. I know it can be disabled manually through the browser's preferences.
Is it possible to disable it using javascript?
View 2 Replies
View Related
Aug 30, 2010
i need to pass the data in the textfields from the left frame to the textfields in the right frame of my frameset. (ex: dslnum of frame1 will be pass to txtDSLTN of frame2)[URL]
View 19 Replies
View Related
May 22, 2011
I have two frames (frameset, let's call it frame1 and frame2). Frame1 has links..., and frame2. When some link in frame1 is clicked, it must be changed content of the frame2. Here's example: click. How to do that? (I don't see any javascript code)
View 2 Replies
View Related
Jul 19, 2006
I have a parent document that has a frameset with two frames in it. The first frame is a "header" that runs across the top of the site, and never changes. The second frame contains the "content" of the site. Essentially, I am trying to figure out how to prevent the header appearing above external sites when the user clicks an external link in the "content" frame.
Every time the content frame changes to a new URL, I would like the check that URL and determine if the content frame is changing to an external URL (i.e. different domain in URL) or to an internal link (same domain in URL). If the content is changing to an external link, I want to break out of the frame and just load that external link in the top most document.
I would like all of my javascript to be in the parent document, not spread throughout the individual pages of the site. I was trying to approach this by setting the onunload event handler of the content frame, but I am left with a couple of specific questions:
1. In handling an unload event, can you determine the next URL that the document is loading? Code:
View 6 Replies
View Related
Jan 10, 2011
I have a little problem, I structure my site with a main page index.html with a frame in the central whit name CENTRALE, so every other page I will open within this frame. Now I need to have a direct link to these internal pages, give an example I wish it were possible to go to the page clothing giving a direct link to that section of the site type www.indirizzo.com / clothing.html because the state of things if I take the 'direct address to that page I open only the part inside of the frame, but I wish I would open inside the "main frame, there is a solution in javascrip to overcome this problem?
View 4 Replies
View Related