Changing Window Height With A Function
Jul 20, 2005
I'm struggling with the following :
I want a function on my form and when I'm calling that function (i.e.
pressing a button), I want to resize the window (only height) with the
paramater that I'm supplying to that function. Is it possible?
View 1 Replies
ADVERTISEMENT
Jun 10, 2009
this is the script to adjust the height.summaryTable.style.display="block"; if(graphDiv!=null && summaryTable!=null){ graphDiv.style.height = document.body.clientHeight - summaryTable.clientHeight - 70;}
HTML code
<table height="100%">
<tr>
<td>
<table>
<tr>
<td>some contents</td>
[Code]...
Its working well in IE and FireFox3.0. but in firefox2.0 table size is increasing on every show hide of summaryTable. pls give me some better sollution for this. The height is adjusted iautomatically if i show a popupDiv.
View 1 Replies
View Related
Sep 4, 2010
I am using a table to help align elements around a page, I would usually be using divs etc but as it is a complicated setup I have chosen to use a table. Anyway on the right hand side of the page I have a column which contains a photo, this td has its position fixed on the screen so when the user scrolls down the page only the gallery td scrolls and the rest remains where it is. However when testing on a smaller screen yesterday I realised that if my td is larger than the monitor or screen then the user cannot scroll down the fixed element. I have therefore come up with the solution of applying 'overflow: auto' to the fixed element. This will only work though if the height of the element is set to the height of the inner page. This is where my script comes in, I need to load the page then change the height of the TD dynamically so that the td can be scrolled down. This is my javascript:
HTML Code:
<script type="text/javascript" language="javascript">
function photoHeight() {
document.getElementById('photo').style.height=window.innerHeight - 59+'px';
}
</script>
Then obviously I have placed 'photoHeight()' into the body onload element.
View 2 Replies
View Related
Sep 3, 2009
I have a function that is suppose to change the height on click. When I initially click it, the function goes through fine. But when I click it again to go back to the old height, it will not work.[code]
View 3 Replies
View Related
May 17, 2010
I have an internal web app that displays some images except they are really big and the app goes super slow and I only have 12 pictures for my test. Sometimes there will be a hundred or more. So is there a way through javascript that I can create thumbnails other than just changing the width and height of the large file?
View 1 Replies
View Related
Feb 28, 2002
I'm building a program for webmasters, and I need to have it so that I can have an <INPUT> button that, when clicked, will open up a new window (400x350 pixels) with a list of links. However, when the person clicks one of those links, the window closes, the value of an <input type="text" name="parentdoc" size="8" maxlength="8" readonly> is updated.
How would I accomplish this?
(As I mentioned above, I am very new to JavaScript, so please provide as much explanation and code as possible.)
View 6 Replies
View Related
Jul 23, 2005
I'm opening a window with a SWF inside (no HTML, just the SWF) but in the
title bar appears something like
http://www.server.com/myDir/myWeb/Flash/myFlash.swf
i'd like to write something like "Wow!! look thos flash!!!".
Could I do that from the function who launch it??? with something like this?
myWin.title = 'Hello world!!!'
View 3 Replies
View Related
Jul 2, 2009
I've been designing a web application that scales to fit the available window space in the web browser so that there is no need to use the scroll bar (and the whole point of the application is to fit the window). I've already figured out how to catch resizes and change the height of the elements on the page (It's pretty simple using onload, onresize and document.getElementById().style.height), but I can't seem to get an accurate height to scale the web content with. The height I want is not the height of the document (Which would be the height of the content...which is what I'm trying to change in the first place!) and not the height of the window (Because if I'm not mistaken that includes the status bar, the tab bar, the URL bar, etc. which can vary between browsers). I need the height of the available web space that I can fit my content into. This would be the space between below the tab bar and above the status bar (To make my height as clear as possible I've provided a link to a screenshot). How can I get this height with Javascript (And I really need it to be cross-browser because I want this app to be able to work on multiple browsers)?
Screenshot (For some reason the DaniWeb Attachment System just refuses to upload my image and gives me a blank page each time I upload the screenshot so I'll just upload it to an image host): http://img15.imageshack.us/img15/4186/screenshothyb.jpg
View 2 Replies
View Related
Jun 21, 2011
The footer bar comes up to the page when the content is small...
But when the content is long enough then its not a problem...
How can I fit the footer bar till to the bottom of the window no matter what type of content length is...
I was trying before using css by height:100% but its not working perfectly.
View 13 Replies
View Related
Nov 9, 2011
I've got a popuped window and I need to set it height. There is innerHeight property in firerox which works perfectly but I can not find any workaround to other browsers. I found window.resizeTo(width, height) but the values are absolute that means that it calculates inner window height and outside area with system bars etc.I look for the way I can do this with firefox
View 2 Replies
View Related
Jul 29, 2010
I have a website, two divs. The right div is fixed position.However when the user browser window, is less than the height of the div, i need it to be no longer fixed, but to scroll with the rest of the page.I imagine the logic to be the following:
-detect div#right height
-if window-height is less than div#right height. change div class to xxx
-if window-height is greater than div#right height. div class stays at yyy
(must update window-height everytime window is resized)
View 2 Replies
View Related
Mar 31, 2011
soloution that will enable me to set a divs min-height to 350px then when the window is resized it will increase over that 350 this supose to allow people with larger resoloutions to see more of the content.
View 4 Replies
View Related
Jul 20, 2005
Im working on a site for a friend, and we've setup a popup window for a couple pages, but with the code we have, the variables for the width and height are in the <script> portion of the code, and not on each individual popup code segment. Is there a way I can add "width=400" or something to each popup to change its width? Code:
View 1 Replies
View Related
Jul 26, 2010
I'm having trouble with an overlay layer on a page I'm rendering on an iPhone, I'm trying to set it's height to the window.innerHeight but it doesn't appear to be working. I'm trying to do something similiar to a lightbox. I have element
[Code]...
View 4 Replies
View Related
Sep 15, 2011
When I reveal my hidden <div> using ...
Code:
I would also like to return the user's view to the beginning of said <div>.
Until now I have been using a page anchor, but that archetype is no longer a possibility for other reasons. In essence, I would still like to have the same functionality as calling an anchor via URL.
Is there not a dom property / that can be adjusted?
View 2 Replies
View Related
Aug 8, 2002
I am currently using a popup window to establish the dimensions of a window, specifically based on the the width/height of the content area.
I would prefer to simply resize it and avoid the need for a popup altogether, but this is made difficult due to inconsistancies as to how resizeTo() accounts for whatever toolbars are 'on' which varies from browser to browser and platform to platform.
The site is coded to W3C (X/HTML, CSS) and the DOM/DHTML content is gradually being rewritten in accordance with the W3C DOM.).
The W3C DOM property to get/set the window content area dimensions are:
View 2 Replies
View Related
Feb 3, 2009
Is this correct?
window.pageXOffset/pageYOffset = how much page has scrolled in standards compliant browsers
window.innerWidth, window.innerHeight = viewport in standards compliant browsers
What browser supports these properties?
document.documentElement.scrollWidth
document.documentElement.scrollHeight
document.documentElement.scrollLeft
document.documentElement.scrollTop
document.documentElement.clientWidth
document.documentElement.clientHeight
And does document.documentElement.scrollWidth and document.documentElement.scrollLeft return the same value?
View 16 Replies
View Related
Jan 4, 2011
Applied this:
[Code]...
View 7 Replies
View Related
Dec 29, 2009
Can I get Images to resize to window height when called from an 'a' link created in a cell of 'insertRow'.
Something like this
Code:
var additemlink=top.frames['register'].document.createElement('a');
additemlink.setAttribute('id','itemlink'+count);
additemlink.setAttribute('href','zanfeld/p'+code+'.jpg');
additemlink.setAttribute('target','display');
additemlink.setAttribute('title','Review this item then click your back button to return');
additemlink.className='itemlink';
additemlink.appendChild(document.createTextNode(item));
additemlink.onclick=function(){resize(this, 100, 100);};
additem.appendChild(additemlink);
I've seen a lot of inline scripting for this but no dynamic unobtrusive 'resize' image examples are to be found.
View 6 Replies
View Related
Jan 8, 2011
I'm trying to build a background in two parts. The header bg is in the body and the lower part is a div with a gradient background color generated by CSS3 or IE filters. I had problems with getting the gradient to stretch all the way to the side in IE7 with plain CSS so I had to start looking for more watertight solutions.
[Code]...
If there are easier methods to solve this split background thing than JavaScript, I'm all ears. I can PM the address of the website, if someone wants to take a look.
View 5 Replies
View Related
Jul 14, 2009
for opening a PopUp Window I use the Popup.js from Adrian "yEnS" Mato Gondelle. Adrian has written a function to center the popup by calculating the window height/with and popup width/height as well ans putting the coord in the middle of these coordinates. Like this:
function centerPopup(){
//request data for centering
var windowWidth = document.documentElement.clientWidth;
var windowHeight = document.documentElement.clientHeight;
[Code].....
My Problem with this is, that it only centers the Popup correctly if you haven't scrolled down the page. What I need is a jQuery way to get the height of the actually scolled position to calculate the correct value for the top css parameter as well, to get my PopUp every time in the correct top/left position without having this scrolling bug. Is there a way in jQuery how I can get the scrolled down coordinates? I need the height of the scrolled position and by adding the half height of the screen resolution I have the css top value which I need here.
View 2 Replies
View Related
May 7, 2010
I would like to set the height of certain #div elements on a page based on the height of the user's current window state. It should draw the elements based on the size of the window at onLoad, and also respond to the onResize event.
View 4 Replies
View Related
Aug 18, 2009
I'm creating a script which causes the page to scroll when the mouse is held down within 1/3 of the page height of the window edge. An example can be found at [URL], and is working fine in Firefox, Safari and Chrome, but not in IE. I'm 90% certain this is due to the browser's non-handling of addEventListener, but I'm not sure how to fix this...I've tried the following so far:
[Code]...
View 1 Replies
View Related
Jul 20, 2009
Currently for the height and width functions, this is the description:
View 3 Replies
View Related
Feb 26, 2007
im using the following javascript function to popup a new window that will display the full size of thumbnail images.
However, whenever I click on an image, the full image will not appear. Only a very small window will appear. How can I alter the function below so that the full image will appear?
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=100%,height=100%');");
}
View 6 Replies
View Related
Jul 7, 2003
How can I create a popup window in a form without showing the status, menubar, location and with width of 502 and height 550?
I was doing something like this, it will popup a window, but I do not want to show the status, menubar, location, etc. The form is submitted to other site.
<form action="http://www.otherdomain.com/preview.php" target="_blank">
<input type="text" name="value" size="20">
<input type="hidden" name= "1" value="1">
</form>
Any idea?
View 1 Replies
View Related