How To Turn A Iframe Scrollbar Off From Javascript
Jul 23, 2005
How do you turn an iframe scrollbar off, from within javascript, after
the iframe has been loaded? In my example, the page with the iframe
on it is initially set to scrolling=yes, however, I want to be able to
set the scrollbar=no, through javascript.
I have an iframe with scrolling="no". Is there of knowing whether that IFrame will need a frame once it is loaded with content? Someway of comparing its height with the height of its content... (possibly...)
I have an iframe with scrolling as 'auto' so the scrollbar appears automatically depending on the content. I have a custom scrollbar for the iframe using the following CSS.
I need an iFrame element that will have fixed dimensions but it some contentintroduces a vertical scrollbar. I would like to find out what the real (usable) area dimension is and resize iFrame whenever new content is loaded.I was googling for some time butJNewbieP.S.The question is: How to find out workspace dimensions? or How to find out if iFrame has scrollbar and if it does then what its width is?
I have some javascript that I have written into the <body> section and it works great. But I would like to make it into a javascript function and define the function in the <head> section. Then in the <body> section write a small bit of javascript that would call the function() object. Code:
Here's the thing, I'm using the iframe as a "browser" within the page on top of the iFrame I've got an input box that I want to use as the address bar
so I did some reading and I can see it's not possible due to security issues, because they're different domains.
but maybe there's a way to get the URL through server side, an xmlhttprequest perhaps?
the only person that's ever going to use this is me, and only on my home PC maybe there's a way to change the browser security settings to make this work? (running Firefox 1.5)
here's the code I'm using that's obviously not working
Code:
var url=document.getElementById('preview').src; document.getElementById('addressBar').value=url;
I have a page with an iframe. On the main page I have a form. Now I want this form to on submit, execute something on the iframe (refresh). However I have different can have different iframe pages. What I need is a way figure out the name or file name of the page inside the iframe and then refresh that page. So it looks something like this:
I want to know the recommended way to handle scripting of/with containers such as an iframe. I have a page with border-navigation bars on the top/bottom/left/right and I want to use an iframe to load content in the middle.
I would like, if possible, to have the parent window resize itself to suit whatever is loaded into the iframe container, deriving the size needed from calculated values. Thus the calculation would have to over-ride default and/or previous settings for the size of the initial iframe after all of the associated container content has been fully loaded and rendered....
I have a web application interacted with through my site via an iframe. The web app displays maps and other info. When i try to load it in the iframe to view the map i get this javascript error: "'parent.mapframe' is null or not an object"
Is this because it is seeing the iframe as the parent frame? Is there anything i can do to get round this?
Is there a way to change an iframe's src with a javascript? I need to have an iframe on my webpage display different data based on which link is clicked. I don't want to have it reload the whole page, just the iframe.
Is there some way from preventing the JavaScript code in a document loaded into an iframe from executing? I don't have access to the pages being loaded into the i-frame so I can't modify then. They are being loaded from a server.
What I get in IE is the "YO!" written to the iframe. What I get in Firefox is the 404 not found page of the site where the original "jstest.html" page and script are hosted.
I have a page with an iframe. The page defines some JavaScript functions in the head part. How can I access these functions from the iframe? In Firefox I can use parent.myFunction() but it doesn't work in IE.
Okay, so I've just installed a javascript that redirects to any random page from a specified list. The problem with it is, it's in an iframe and works as sort of an advertising area. So on the mainpage where the iframe has been placed, whenever someone uses the back button, it just keep going back in the iframe and choosing random pages. The back button doesn't work on the mainpage and instead is used in the actual iframe.
I'm not sure if this is a problem with the iframe or the script, and I don't think I have the mental capacity to figure it out so I'd really value some help! Oh, and apparently the problem doesn't occur when using Firefox. Code:
I have an IFrame whose document is created completely by Javascript code at runtime. The document in the IFrame accesses Javascript functions in the top level document. This works fine most of the time. But every now and then, when I hit the back button, the browser suddenly thinks the Javascript created document in the IFrame is not from the same domain as the topmost document, and therefore I start getting "permission denied" errors when I try to access the top level document's Javascript functions.
If I look at the IFrame document's properties (Mozilla->This Frame->View Info), it shows the expected URL with a domain name that matches the top level document.
I am trying to dynamically display a select menu when a checkbox is selected. I have successfully go the select menu to come up when the box is checked but the problem is that you can't uncheck the box to get it to go away. Can you tell me how to do this or even better show me a better way? Code:
I have a web page that has javascript running an html5 page where as the embedded movie plays, the captions play below the movie. What I'd like to do is to have a button that turns the captions' visibility on and off, but I can't seem to get it to work. Probably easier to just show you the web page so you can see the files and view source: [URL] Click the test.html file and hit the play button for the movies to see the captions. I think it might have something to do with the captions being within the media div, but I'm not sure how to address the caption id other than the way I have.
i want to do (multiple) file upload(s) and display a progress bar. with firefox and safari it is no problem at all. only IE makes some problems.
my script is based on ajax-uploader, which can be found at www.srmiles.com/freestuff/ajax_file_uploader/ . you can do multiple file uploads. each upload will have it's own "form"-tag, so that each file is uploaded for its own. could be a good solution if there are "big" uploads.
so here is what i do:
i have a html-page in which several forms with file-input fields are generated. when i now hit the "one" submit button at the bottom of the page a javascript function upload() starts it will iterate through all forms (id='frmUpload_xx'), will get the filename, start a ajax request for the progress-bar function and do a form.submit().
if the first form/file is uploaded, a settimeout('upload()', 1000); is called and the next form will be processed. all form's have an target="uploaddiv", where uploaddiv is a invisible iframe. so the output of the upload script is put in this div. output should only be a "OK" at the end. no usefull output no info no nothing.
firefox and safari are working as expected, only IE stops after the first file is uploaded. i get an javascript error saying "zugriff verweigert/access denied" on object line x... this is the place where i call "form.submit()".
this is the upload-function:
function upload() { if (uploads.length>0) { form = document.getElementById('frmUpload_'+uploads[0]); if (form["filename"].value == ""){ alert("Please Choose a file to upload."); } else { filename = form["filename"].value; if (filename.lastIndexOf("")>0) { filename = filename.substring(filename.lastIndexOf("") +1,filename.length); } else if (filename.lastIndexOf("/")>0) { filename = filename.substring(filename.lastIndexOf("/") +1,filename.length); } makeRequest("upload_progress.php?sid="+sid +"&filename="+filename,progress); form.submit(); } } }
the strange thing is, that filename is filled correct, that means the object "form" is found and exisits. the first iteration is working, only the second ends with an error.
think it have something to do with redirecting the output of the upload-script in an iframe. after that IE can't access form - at least IE is not allowed to submit the form as i can access a form field (filename). i worked on that the last two days and haven't found a solution...
Setting: chruch multimedia computer and projection system, with 2 display monitors. The projector is connected to monitor #2.
Is there some way using JavaScript I can display a ".jpg" picture on display #2? I know how to send the <form> tag to turn on/off the projector, but don't know how to put up a picture. I don't want any browser artifacts to show. Just the picture.