I have a mainpage and it contains iframe (myFrame). A js function validatedata() is on iframe. before submitting mainform in mainpage i am calling validatedata() function as below. mybool = document.myFrame.validatedata();
This works in IE 6.0 but fails on mozilla firefox.
Currently, I have one of the iframes working. When you click on it text below appears with information about the jewelry.
I would like an iframe to open up (immediately to the left of the image) and show an enlarged image of the thumbnail (yes I know right now the images are not thumbnails, but my friends are working on the graphics).
I want to load a javascript file on a root page with various iframes, then call the javascript functions from the root page to be displayed in the iframes. Any idea how to do this?
I have a webpage with some divs and iframes in them, I have some Javascript code in another page in one of the iframes that when activated, will change the page within the other iframe. The code I have throws the following error:
'null' is null or not an object
and it is complaning abou the following bit of code:
var obj = document.getElementById("frame2"); obj.src = new_src;
But I am not sure if the code is the correct code anyway. Can anyone assist please? Please find below my complete code, hopefully you can spot what's going on. Here is my 'index.htm' file: Code:
I'm starting to use some iframes in a div layer. I want to know if i can use javascript to change the size of the iframe (from the parent page containing the iframe).
In IE i can use 100% width and height to fit the iframe to the layer, but in Netscape 6 the iframe doesn't appear if the height is set in % values - hence the need to be able to specify it dynamically as the layer wil change size.
I am using struts frame work and in one of the jsp pages I have a bunch of IFRAMES like this.(This is in logic iterate and the recordId is incremented with that iteration) ....
I have a really professional conspiracy movie site and I use tons of layers and an external scroll bar assembly. I would like to put the various sections into MS Iframes and in order to clean up the page but I find that the iframes interfere with the getting the mouse coords from the screen which is essential in moving the scroll bar around.
My test html is given below. With the iframe hidden the mouse coords are obtainable. With the iframe visible things get buggy.
Where the "background_foriframe.html" is just a html file with a background layer using a "DIV" tag. Code:
Is there a way to communicate between iframes on different subdomains? e.g. from one.dot.com to two.dot.com? there is a security access restriction passing javascript commands between subdomains that we've run into.
I run a streaming site and am looking to have the option on a chat room next to the stream. Not everyone likes having the chat facility so I'd like to make it optional.
As the page loads I'd like the content to look like the diagram below with the stream (iframe1) taking up 95% of the page and the other 5% being taken up by an image which will say "open chat". The chat (iframe2) would have a width of 0%. [URL]
Then when the "open chat" image is clicked I'd like the chat (iframe2) to become 35% and the stream (iframe1) to become 60%. If someone could make a nice sliding effect when the image is clicked that'd be even better. Here's a diagram to show what it'd look like with the resized iframes. [URL]
Is it possible to add an onclick event to an iframe or perhaps a DIV that holds an iframe?
In specific I am using the Facebook Open Graph like button code...
What I would like to do is add a simple onclick event to it so that I can run a process when the user clicks on it, at the moment I am just trying alert but cannot get it to work. By setting the iframe within a DIV with height/width specs set would an onclick event work within the DIV?
I apologise if this is in the wrong section. I have built a website using iframes at: [URL] but when clicking through the menu, the address bar still stays at [URL] no matter which page is loaded into the iframe. I have seen a number of javascripts around that can change this, but most do not seem to work anymore. Has anyone a sure way to correct this please :)
Ok first the bad, it will not work from a stylesheet, you have to use style="display:none" all over the place, I will try to fix that without adding more than 2 lines to the script somehow, I hope. you can not have line breaks in the innerHtml statements in your links(I think that's normal anyway). javascript:void(0); will not work for an iframe, you have to use #(or #null to keep from clicking up to the top of the page) for the hrefs, I don't know if that is a bad thing or not, there has to be something better than both of those options. now the good, if you do not have access to the head of a page, everything works from the body of a page. it is good for making ul/ol tags for a vertical menu without that complicated scripting having to differentiate ul/ol text and li links in those scripts for just a simple menu, the ecmascriptmenu is the only one that makes sense to me, hope he gets his server fixed. the script seems to work with or without a doctype in IE6 firefox and safari. people always wonder why I try to make these type of scripts, I usually maintain long lists of links so I like to provide small previews(iframes that do not load until clicked) for each link, the best part is that IE firefox and safari react to it flawlessly unlike most other types of scripting, one script had an eval statement that gave me tons of trouble taking it out and the other script I took out a server sql proprietary call to a rowid for a table and made almost any html element be a target(a p tag for instance). here at :
I have a table that contains two iframes, left and right. The left iframe contains a list of choices, when clicking the selection the right iframe displays the requested data.
Each of these choices link to web pages that are the same width but different heights.
If I right click my home page icon and open the page containing the two iframes in a separate web browser window, everything works correctly as I choose all of my different choices in my left iframe. I am calculating the height of the iframe so that it can be sized vertically.
If I dont right click and open in a new browser but let these two iframes load into an existing iframe called content, this is when the iframe never resizes. If you load into an existing target that has a size, is there not a way to have it resize or do I have to load it again?
On larger pages, I can hold my mouse in the right iframe and drag down which will show me the rest of the content in the iframe.
Since everything works correctly when I open the web page containing the two iframes in a new window, I know I could create a page containing each combination of left and right iframes and then loading them into my content iframe.
However, this defeats the purpose of a muti selection list that is supposed to stay static while the right iframe changes content and size.
I am working in IE and FireFox compatibility. In my application we are creating dynamic iframes inside another iframe. I have to access a div inside the iframe. In IE everything is working fine. But in Firefox, I am not able to access the div.
I have tried using: iframename.divname iframename.getElementsByName("divname") iframename.getElementById("divname") iframename.getElementByTagName("divname") --> This was not throwing any error but the element length was 0.
I have created the iframe using the method function getIframe(name){ var iframe = document.getElementById(name) var ifDoc if(iframe.contentDocument){ alert("1"); ifDoc = iframe.contentDocument } //NS6+ else if(iframe.contentWindow) { alert("2"); ifDoc = iframe.contentWindow.document } //IE else { alert("3"); ifDoc = iframe.document } //IE5 alert ("value for getIframe is "+ifDoc); return ifDoc }
I have a problem because I don't know nothing about Java Scripts. In the [URL] I have load a page that contains two iframes, the first (left) is the menu and the second (right)is the explanation for each one of the menu tabs. No problem so far. The problem is that I need that the menu tab keeps highlighted while you see the relative information on the right side.
I am building a webpage built with a column on the left, a header, and a main iframe which is the main content of the page. The content of the main iframe can get to be long, and I want the iframe to resize its height to fit the content. I know javascript can do this. I have seen many live examples of it working online. My problem is when I try and use the code myself (even if I leave the live example pages unchanged, but just save them and run them offline) it doesn't work. That is, the iframes work, the page works, but the iframe doesnt fit it's content.
Now, the page that I'm building is fully offline right now and I don't know if my javascript will work just fine if hosted on a domain and accessed online, but as it is it's not working and I don't know why. As an example here is some code, and the page it was taken from
My javascript function for changing src of iframe does work in Opera, but it doesnt work in firefox or IE. I tried several ways, and now i have no other way, just ask.
function showMap(srcs, ine, ind, link){ if(document.getElementById(ind).style.display == 'table-row'){ document.getElementById(ind).style.visibility = 'hidden';
I was just wondering, why people continue using frames and iframes when we have handy AJAX approach to fill needed divs with content. Is it because of some user's paranoia about javascript? But if they make pages without javascript, they would not need to bother, how to access other frame's content, would they?
What would be the danger in having a lot of hidden iframes? i.e. potentialy 30-40. I need to store a bunch of data and thought about using hidden iframes to do it but wasn't sure if this would bog down my page or not. Opinions? I know this is not an IDEAL way to store data but I'm at my whitts end and it sounds like a nice workaround right about now!