Resizing Frames

Sep 25, 2003

I'm building a tool for my company and I'm making use of frames in it. I have one frame on the left side and two frames on the right side. I have two forms on the main frame (the left panel) and the user has an option to submit to either frame or to both frames.

I'm wondering: is there any way to resize the right bottom or right top frame via JavaScript if someone submits to only one of the frames?

View 2 Replies


ADVERTISEMENT

Resizing The Width Of Inline Frames

Mar 19, 2005

I did some searching on here and came across a nice example of how to resize an iframe's height using javascript. I've been screwing with it for hours now but I can't seem to get it working for resizing the width. I can't seem to figure out what I'm doing wrong. Here is the code:


function getIFrameDocumentWidth (IFrameDoc)
{
if (typeof IFrameDoc.width != 'undefined') newWidth = IFrameDoc.width;
else {
if (IFrameDoc.body && typeof IFrameDoc.body.scrollWidth != 'undefined') newWidth = IFrameDoc.body.scrollWidth;
else newWidth = null;
}
return newWidth;
}

function resizeIFrameWidth (iframeID, minWidth)
{
var IFrameDoc, oIframe = document.getElementById(iframeID);
if (typeof oIframe != null)
{
if (oIframe.contentDocument)
IFrameDoc = oIframe.contentDocument;
else if (oIframe.contentWindow)
IFrameDoc = oIframe.contentWindow.document;
else if (oIframe.document)
IFrameDoc = oIframe.document;

var newWidth = getIFrameDocumentWidth (IFrameDoc);
if (newWidth != null) oIframe.style.width = String(newWidth + 'px');
else oIframe.style.width = String(minWidth + 'px');
}
}

Then in the html page whre the iframe sits I use:


Code:

<body onload="parent.resizeIFrameWidth('myFrame', 250)">

Any ideas why this might not be working?

View 5 Replies View Related

Resizing A DIV

Dec 12, 2006

I've read through a number of links that discuss various methods of
resizing a div; however, nothing seems to work correctly for me. The
basic idea is that I would like to implement is a panel that can be
hidden (to save space), but collapses smoothly, rather than all at
once.

I've tried setting the div's style.height property. Doing so does, in
fact, resize the div (at least in Firefox 2.0); however, the inner text
does not disappear as the div is resized. Should I apply another CSS
style to the inner text or is there another method of obtaining the
desired results? Code:

View 4 Replies View Related

Resizing A Div?

Sep 20, 2009

<div id="resizetest" style="width:200px;height:200px;border:2px solid blue">
<div style="background:#000033">
<a href="#" style="float:right;background:#ffffff" onclick='document.getElementById("resizetest").height="50";'>_</a>[code]....

Why doesn't this resize? I've looked at examples, and I don't see what's wrong.

View 5 Replies View Related

Resizing The Window

Jul 23, 2005

I want to reload th page after resizing the window (Browser). I used the
event onresize.

The problem the server gets too many requests (on every resize: pixel by
pixel).

window.onresize = myfunction();
What can I do to reload the page only after releasing the mouse.

View 2 Replies View Related

Popups And Resizing

Jul 23, 2005

I am using a popup window to show pictures. Each time the user clicks on
a thumbnail in the mail HTML page, the popup either appears or reloads a
new picture.

Some pictures are portrait, and some are landscape. I build the popup
html dynamically. How can I a) resize the popup window to fit the image,
and b) pop it to the forefront once the new picture is loaded?

View 8 Replies View Related

How To Prevent Div From Resizing

Dec 10, 2005

i have a div, i set the innerHTML property to a formatted paragraph of
text. however, at times the text exceeds the width (and height) of the
div. how do i create a fixed width div and make it use a scrollbar if
the contents exceed the height and width specified. i'm using microsoft
visual studio, and i have the width explicitly set in the properties
but still on setting the innerHTML it resizes automatically.

View 5 Replies View Related

Frameset Resizing

Aug 30, 2006

I have a frameset page as my index.html page and have noticed that if my
page is opened in other resolution than the one it was created in, some
pictures shift locatiuons.

If this was a non frames page i knew how to fix it...
Is there any was to automaticaly resize a frameset proportionaly to the
screen resolution?

ex: i want one picture to be exactly 1/4 of the screen, in a one-page i
would do someting like...

<img id="logo" border="0" src="Logotipo.jpg">
<script type="text/javascript">
document.getElementById("logo").width=screen.availwidth/4
document.getElementById("logo").height=screen.availheight/4
</script>

How do i do this with a frameset?
ex: banner frame be alway 1/6 of the screen height

View 2 Replies View Related

Image Resizing

Mar 19, 2007

We are code crushing the width of images from 285px to 260 pix.
However we aren't changing the height. we need a bit of javascript
that can make that percentage change to the height as well.

View 6 Replies View Related

Resizing Css Div In Javascript

Jul 20, 2005

I have a CSS div defined as follows :
<div id="col-2" >

In some circumstances I want to change its width.
I have tried all the following within a javascript function:

document.getElementById("col-2").width= "900";
document.getElementById("col-2").resizeTo(900, 520);
document.getElementById("col-2").width.value= "900";
document.all.col-2.resizeTo(900, 520);
document.layers["col-2"].resizeTo(900, 520);

None of which have worked.

Within the stylesheet I initially had col-2 defined as an ID. Clutching at
straws I changed it to a class but that made no difference.

Can someone point out the right way to do it?

View 3 Replies View Related

New Window Resizing

Oct 19, 2005

i have an imagemap, and i don't know where to write in the specific size for the new window popping up...if it's possible? i'm having just an "add to cart" page pop up and i don't need a big space..

<area shape="poly"#$36.95 decorated mixed
coords="590,313,431,309,430,325,565,334,581,315,581,313,581,313,581,313" href="b3695.html" title="$36.95 decorated mixed" target="_blank" />
<area shape="default" nohref="nohref" alt="" />
</map>

View 1 Replies View Related

Resizing Table/iframe

Jul 23, 2005

I have an iframe embedded in a single cell table. I'd like to resize the
table and iframe to match any changes made to window size. Is this possible?

View 3 Replies View Related

Problem With Iframe Resizing

Jul 23, 2005

Can someone help me here because this is really killing me!

the problem is, i have this javascript code in my aspx page that i want
it to work on almost all browsers, especially opera and safari :

function resize(){
displayFrm = document.getElementById("ifrmDisplay");

innerDoc = (displayFrame.contentDocument) ?displayFrm.contentDocument :
displayFrm.contentWindow.document;

objToResize = (displayFrm.style) ? displayFrm.style : displayFrm;

objToResize.height = innerDoc.body.scrollHeight;
}

the code above gets called every time a new page is loaded inside the
iframe (ifrmDisplay) what its doing is resizing the iframe so it can
have the same size as the page inside it, so i can eliminate the need
for vertical scroller for the iframe, i assumed that it works on opera
and IE at the same time, when i tried it out, it worked on IE but not on
opera. after lot of time in researching how i can get workaround this
issue with opera, that is the best possible solution i have and yet it
doesnt work. so i gave up and asking you if you can help me out here ,
coz this is jst driving me crazy!

the problem is im not a javascript expert, to be honest i jst started
doing javascripts about two days ago, that is why im in need for help

by the way, here is inner html for the iframe if its any use

<iframe id="ifrmDisplay" style="Z-INDEX: 99; LEFT: 187px; WIDTH: 567px;
POSITION: absolute; TOP: 136px; HEIGHT: 408px" src="" scrolling="no"
onload="resize();">
</iframe>

View 4 Replies View Related

Iframe Resizing On Opera

Jul 23, 2005

the problem is, i have this javascript code in my aspx page that i want
it to work on almost all browsers, especially opera and safari :

function resize(){
displayFrm = document.getElementById("ifrmDisplay");

innerDoc = (displayFrame.contentDocument) ?displayFrm.contentDocument :
displayFrm.contentWindow.document;

objToResize = (displayFrm.style) ? displayFrm.style : displayFrm;

objToResize.height = innerDoc.body.scrollHeight;
}

the code above gets called every time a new page is loaded inside the
iframe (ifrmDisplay) what its doing is resizing the iframe so it can
have the same size as the page inside it, so i can eliminate the need
for vertical scroller for the iframe, i assumed that it works on opera
and IE at the same time, when i tried it out, it worked on IE but not on
opera. after lot of time in researching how i can get workaround this
issue with opera, that is the best possible solution i have and yet it
doesnt work. so i gave up and asking you if you can help me out here ,
coz this is jst driving me crazy!

the problem is im not a javascript expert, to be honest i jst started
doing javascripts about two days ago, that is why im in need for help

by the way, here is inner html for the iframe if its any use

<iframe id="ifrmDisplay" style="Z-INDEX: 99; LEFT: 187px; WIDTH: 567px;
POSITION: absolute; TOP: 136px; HEIGHT: 408px" src="" scrolling="no"

</iframe>

View 5 Replies View Related

Resizing And Caching Images On The Fly.

Nov 8, 2006

I have a function which caches images for a slideshow once the script has loaded. Here is an exerpt:

var base_ref = "http://www.example.com";
var images = new Array();
var tmp_images = new Array();
tmp_images[0] = "image1.jpg";
tmp_images[1] = "image2.jpg";
tmp_images[2] = "image3.jpg";
tmp_images[3] = "image4.jpg";
tmp_images[4] = "image5.jpg";

function cache_images () {
for (var i=0; i < tmp_images.length; i++){
var cacheimage=new Image();
var tmp_name = tmp_images[i];
var url = tmp_images[i] + ".png";
cacheimage.src=url;
images[tmp_name]=cacheimage;
}
}

As it is, the script whizzes through the for loop, and then moves on to the next function. The only trouble is that it moves on to the next function whilst it's still downloading the images from the server. Is there anyway to make the script wait until the downloading is completed, so that I can then go on to resize the images if it's needed?

View 2 Replies View Related

Critique This Div Resizing Script

Nov 16, 2006

The below script sets and maintains the equal heights of 2 (or 3) divs which are floated next to each other on a page. I want to ensure that I have not overlooked anything and it will not error. In other words, it either executes successfully or not at all. This script is a compilation of code found on various posts along with my personalization thrown in to meet our specs. Note that this is just a "nice to have" script so if it doesn't execute the page is still usable .....

View 4 Replies View Related

Button Resizing In Opera

Jul 20, 2005

How can I dynamically resize a button in Opera?

The following code works for both IE 5.5 and NN 6.1, but Opera 7.01 is not budging...

View 2 Replies View Related

Resizing Iframes On Click?

Dec 1, 2009

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]

View 1 Replies View Related

Textarea Resizing A Table ?

May 17, 2011

I have made a table with a textarea that is resizable. The problem is that when it resizes, it also resizes the table row and columns. Is there a way to fix this? Maybe a way to resize from the right side and bottom of the textarea only.

View 2 Replies View Related

Resizing Iframe To Fit Content?

Nov 30, 2011

resizing an iframe to fit it's content.

Basically, I have 10 spreadsheet pages saved as htm files.

I am creating a page that enables me to view each of these htm files.

I need the iframe to be resized for each htm file.

This is my code:

<html>
<head>
<script language="javascript">
<!--

[Code]....

This seems to work but it has a few issues, It does not resize properly for every link, only some of them.

View 2 Replies View Related

Div Not Resizing Onload Until Refresh?

Feb 6, 2010

I'm building a page here: http:[url]....I have some JS in place which you can see in the source at the bottom of that page that sets the width of the box surrounding the dark grey image to a certain width (image width + 64px).The problem is that when I first visit that page the box resizes to a really thin width and the image flows out of it, however if I refresh the page the box resizes to the correct width that I want it. Does anybody know why it does this?

View 1 Replies View Related

Resizing And Animating Divs?

May 6, 2010

I’m practicing Javascript trying to do some animations but I ran into problems.I tried to fade a div doing something like this…

Code:

<HTML>
<HEAD>
</HEAD>
<BODY>

[code]....

View 7 Replies View Related

Dynamic Window Resizing

Jun 11, 2003

How can I resize the window from JavaScript - and it the inner size I need, so window.resizeTo() is no good as that applies to the external size.

I'd prefer the cross-browser, DOM compatible approach if pos.

View 5 Replies View Related

How Do I Stop Someone From Resizing The Web Text

Sep 22, 2006

Im using dreamweaver and I am wondering if there is a way or some sort of code I can stop the user from resizing text with the cntrl + mouse wheel ? Ive got CSS style sheets attached to my site but dont know what to do next?

View 7 Replies View Related

Resizing A Div By Mouse Drag?

Jan 19, 2010

how to resize a div by mouse dragging in javascript....first of all is it possible or not?? and if so , what should i do......

View 1 Replies View Related

Resizing The Browser Window?

Feb 12, 2010

I have a quite interesting design from my point of view, but it has a small issue: the maximum screen width can't be wider than 1500px.I would like for somebody to share with me a script which detects the visitors screen resolution and if the screen resolution is higher than 1500px ( for example ) the screen resolution should be re-sized to the maximum point, 1500px in my case.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved