Force External Page Into Iframe?
Apr 27, 2006
If I try to put a site into an iframe that has "escape frame" code in
its source (posted below), it will reload the requested page into the
parent instead of the iframe. Is there a way to prevent this from
happening?
One could use onunload to stop the redirection, but I would like to
find a way to load a page into an iframe, even if it has this type of
code.
I have considered server code loading the content and re-displaying it
but I would like to find a pre javascript solution.
//this is not my code
if (self != top) {
if (document.images) {
top.location.replace(window.location.href);
} else {
top.location.href = window.location.href;
}
}
View 3 Replies
ADVERTISEMENT
Jul 23, 2005
I've a small external .JS library that allows a non code-savvy user to
occasionally update a list of values that are read as a JS array and
used to populate the <option>s of a <select> in the calling page's form.
Anyway, is there a way by which I can ensure, regardless of the user's
browser settings, that the JS library is not used from cache but re-read
each time, to ensure the up to date list is used?
If not, I might as well put the JS array code back in the calling page,
especially as the split is for ease of use by the page's owner, albeit
with increased change of editing errors. A database solution, etc., is
inappropriate here.
View 4 Replies
View Related
Oct 18, 2011
I have several hundred html links in a file "main.html" pointing to external websites. ie: "external.html"
When a user clicks an external link from within "main.html", I want to bring up "external.html" in all its glory, but with a banner / header across the top (I am guessing iframe is a good option) - so effectively the link will take us to "frame.html", with "banner.html" and "external.html" in an iframe (or alike).
The banner has to be populated with information specific for that "external.html" file. ie: when they click on the link to "external_1.html", the header might have the text "external_1".
So, I am happy with doing this as a one off, but can't see the method to have a single 'onclick' script to pass the required information from "main.html" to "frame.html", and then for "banner.html" to be updated with the text passed from the 'onclick', and to know to call in the correct "external" to populate the iframe.
I will further complicate it by asking if it is possible to have all the scripting required contained within "main.html"?
View 1 Replies
View Related
Nov 7, 2005
I use an asp page to display pages, where the dynamic content is in an
iframe. To calculate the height of the iframe I use the calcheight function. However when trying to do this with external pages, I get an access denied error, and the iframe won't display correctly. Is there a way to solve this or another way to calculate the height for the iframe. The relevant code displayed below...
View 1 Replies
View Related
Mar 9, 2009
I have a simple iFrame which I use to open other websites. However, some websites force themselves to be opened in "parent" windows when links are clicked, or even always. How do I go about avoiding this? I believe there is a way to set my iFrame as "self" or something like this in order for all sites to still only load in iFrames, but I'm not sure how.
View 2 Replies
View Related
May 3, 2005
I have a page A which contains an iframe B which gets loaded with content as the page loads Page A has a link. When the link is clicked, I invoke some JavaScript function which performs some tests, and then I would like to have my iframe reload some other URL
The problem is that I change the iframe's src attribute to the new URL but nothing happens. The iframe isn't reloading.
How can I force it to reload? I heard that it was a problem in IE but that could be a mistake on my part It is vital to note that if I clean my browser cache (on IE), then the code works fine once (the iframe gets reloaded). But once it is in the cache, successive attempts fail
Here is a sample of my code
Code:
<head>
function test() {
// perform some tests here
[Code]....
View 14 Replies
View Related
Dec 17, 2005
I have a script that parses window.location.hash to figure out which xml
file to load. The xml files populate a page on a framed site. The code works
correctly to a point.
If I have a seperate html page to support each xml it works. I would like to
eliminate the individual html pages becuase only one should be needed.
When I use one page the first link works, then the second one does nothing
(doesn't refresh the frame). If I click to a static image for the frame then
click the next xml link it works.
What can I do to force the frame to update? I am clicking on a HREF link
that should re-load the html page, but with the new xml data.
View 2 Replies
View Related
Mar 8, 2010
how can i make <textarea> tag with default Language i tried <textarea lang="he" > but it didnt work...
so i thgout about it ..
and in my case i want to force the whole page default Language to hebrew...
can i do that with javascript ? when the page load just to choose the Language hebrew then when user type it will type in hebrew...
View 3 Replies
View Related
Jul 20, 2005
I've got a web site that is frequently updated; yesterday several
subscribers contacted me to say they couldn't see the update. I suspect
this is a cache problem, so is there a way to force a page to be
reloaded when it is changed. I realize it is too late for the current
pages, but I'd like to include something later.
View 3 Replies
View Related
Jun 28, 2004
I'm buildning a permissions system. If the database check shows that the user doesn't have access to the PHP script she tries to access, I want to diplay an alert window telling her so. And when she presses the "OK"-button, I want the browser to send here back to the previous page that she came from.
Is this a javascript problem? Is there a quick and dirty solution?
View 1 Replies
View Related
Oct 23, 2011
1st post: how to force an iframe to reload? 5th post:how to force an iframe to reload? i tried the first way, and this doesn't work, then i try this:
[Code]...
View 1 Replies
View Related
Sep 2, 2007
<body>
<iframe name="alertiframe" id="alertiframe" width="1" height="1" src='xmlsample.html'></iframe>
<script>
function alertfunc()
{
sometext = window.frames['alertiframe'].document.all.tags['to'][0].innerHTML;
alert(sometext);
}
</script>
<a href="javascript:alertfunc()">Click Me</a>
I am working with an older browser more of MAC IE. It works with DOM 1 and extremely partially with DOM 2. contentDocument and contentWindow does not work on this browser.
The above code works very nicely, however as soon as I rename the file to "xmlsample.xml" with an xml extension, it does not work anywork. If you have any other solutions please let me know. Rem we can't use any newer techniques, this is very basic DOM.
View 4 Replies
View Related
Jul 11, 2007
Is there ANY way to get the URL of an iframe if the page the user is on is an external domain? I know this is normally blocked by the "Same Origin Policy", but I'm just trying to find out if there is SOME workaround. All I'm trying to get is the URL.
View 1 Replies
View Related
Nov 19, 2008
I am trying to resize an external website in an iframe using javascript, but have not found code that works very well.
View 5 Replies
View Related
Sep 11, 2011
I want to open All external link, in iframe with the help of javascript. For E.g, My site is www.domain.com and I have made few post where it contains few external link, so, rather than opening the link in new window or in new tab or in parent page, i want to open link in iframe.
So that user remain in same page.
For an instance, "search box" of dreamincode.net.
View 5 Replies
View Related
Jun 16, 2009
How do I force the Web page to reload when someone just changes the value in the dropped down list? To be clear there are many items in this form, one of which is a dropped down list, but if they choose to certain rows of this drop down list then new fields/data needs to be presented to the user.And of course change the Web page to re-load new values based on what row in the dropped down list they changed to.
View 7 Replies
View Related
Jan 25, 2010
Disclaimer 1: I am not a programmer, just a curious designer, so please take that into consideration in your replies.
Disclaimer 2: Despite all advices against it, I couldn't find a better solution to my website than using iFrame
Disclaimer 3: Before asking for help, I researched *several* forums and although I found people discussing similar issues,
implementing a method to intercept and redirect external links to a dynamic iframe. By "dynamic" iframe I mean an iframe whose SRC would be filled up in accordance to the external URL being intercepted and that it would resize its HEIGHT accordingly in order to avoid scroll bars.The function for resizing the iframe id="child" is already correctly implemented like so:
<script language="JavaScript">
<!--
function calcHeight()[code]...
This "replacement" function would be called onLoad and if tested true would run and refresh the page with the proper value in the iframe SRC.All this should be accomplished while still making the iframe HEIGHT dynamically adjustable and show a "clean" URL in the browser, such as "http:[url].....The potential issues I foresee is an infinite loop due to two onLoad queries (one for SRC, another for HEIGHT) in the parent and child objects, which might required a merge into a single script.
View 26 Replies
View Related
Nov 20, 2010
I have built a basic website that contains an iframe in the middle, called "iframe1". In this iframe I wish to load an external message board from proboards.com. In my code I can easily do this by making a button or hyper-link with the href="http:proboards.com/myforums" and the target="iframe1".When I do this it will load inside of it the iframe jsut as I want it to. However, my the problem is when you click on the button to login its coded to target "_top" and it opens on the entire page replacing the whole website. If i run firebug (a real time HTML editor). I can easily locate and change the link code to target="iframe1". But How can I write a script in javascript in my webpage code to do this as soon as the iframe has loaded the external messageboard?
View 5 Replies
View Related
Mar 5, 2009
I am trying to get an iframe to have dynamic height - I want it to resize to fit the contents of the page.There is a four or five step process within the iframe. So for example, page 1 is rather short, and it'll have a link that sends you to page 2, which might be rather long.I have no control over the pages I am using in the iframe and they are on another domain.I have googled and and searched the forum and I've yet to find anything that works. A lot of them say they're not cross-browser compatible, but I haven't gotten anything to work how I'd like in any browser.I'd like to do it without jQuery.
View 4 Replies
View Related
Aug 24, 2009
Order entry project. I am using an iFrame to pull external forms that I can not change. Once our employee enters in the information and submits I would like to redirect the existing window to a new page.
I've tried many variations of:
<script type='text/javascript'>
function iHistory() {
var hist=history.length;
if (hist>1){
parent.window.location = "orderentry.php";
}}
</script>
Since I have no control of the external form I have been using OnLoad() in the iFrame tag to call iHistory(). The script works great unless the browser history is >1 If possible, I would like to also setup like a 5 or 10 second delay so the employee can see the framed confirmation page before redirect. So the function needs to check current history.length, when that changes delay 5-10 seconds and redirect parent window to orderentry.php
View 3 Replies
View Related
Jun 30, 2009
I have a web page A that loads another page B using an iframe (or anobject tag), the B page is an external page (it's not on my server)and contains a form.I want to be able to auto fill the form with pre-defined values. Injquery i think it's impossible due to security reasons,I hope I explained the problem correctly, if you need more info just
View 4 Replies
View Related
Oct 18, 2009
I'm kind of new to javascript. Is their anyway to track right mouse click within an iframe that is linked to an external site (i.e. [URL])? I'm trying to see if I can have a alert window say "This is an image" when I right click on an image within the iframe.
View 1 Replies
View Related
Aug 31, 2011
load external pages (from a different server) into a lightbox, without using a iframe.
View 6 Replies
View Related
Aug 14, 2009
I'd like to resize an iframe into which different (same domain) pages of differing heights are loaded. I can do a first-time resize no problem. It's the subsequent reloads that need to pass back their height to the parent page There seem to be lots of solutions for that around, but few I can see for resizing each time the iframe reloads. One is described here on another board [URL] but unfortunately the test page is no longer around (or indeed the site), so the full code is no longer available there. This one works, almost, for me: [URL] it does resize for me, but not quite sufficiently high each time - about 90% of what is required: [URL] Is there a way to add on sufficient extra margin that scrollbars no longer appear?
View 8 Replies
View Related
Jul 19, 2010
My goal is to load the JS for a specific element before displaying that element. I integrated a third part script, and it works well. I set the timer here:
The JS is in my heading as <script type="text/javascript" src="countdownpro.js"></script>
About mid-body I have: <span id="countdown1">2010-07-20 00:00:00 GMT+00:00</span> which allows for the setting of a target date to countdown to.
When the page first loads it shows the above long format target time, until the js/meta tags kick in to modify it to just show the actual countdown as 00:00:00.
I have attached countdownpro.js to this post. I tried shifting the function CD_Init() to the top of the script, and also appended it inline with the .html. I tried setting the big external script to "defer", but neither arrangement worked. I also tried placing the src file right at the top.
View 2 Replies
View Related
Mar 29, 2011
I have this, and works fine ... googles for quoted string
<form method="get" action="http://www.google.com/search" target="_self" >
<input type="submit" value=""<%=con.rs.getString("term")%>"" />
</form>
instead I want to display google page in iframe, like:
<input value ="<%=con.rs.getString("term")%>" style ="button" onClick = "document.getElementById('mainContenceFrame').src = 'http://www.google.com/search';" />
View 1 Replies
View Related