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
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.
I have a website which displays photos. I want the photos to be resized depending on the innerWidth and innerHeight of the browser. I have my resolution set to 1024x768. So if you go to [URL] and click on 'Commissions' my 'w' variable in the URL contains 1024 but for some reason the 'h' variable displays 50. If I click on 'Commissions' one more time then it correctly displays h=602.
My code is all about darkening out part of the browser window, making unclickable. I detect if the user is running IE, and if so, I don't use window.innerHeight because MS doesn't support anything. However, I have noticed an issue, and I believe it has to do with the "top" value. I've tried using window.screenY, but that didn't seem to solve my problem. You see, if you are running FF, it draws a box that starts in the top corner and only goes down as far as you can actually see on your browser.
Say you are scrolled down a little bit on the page, you can see the end of this box - it doesn't cover the entire page, only the part that is visible when the scrollbar is all the way up. I have included a picture to clarify what I'm talking about. The non-grayed out area is the area that would normally not be visible when the scrollbar is at the top. I would like to draw this box over the visible part of the page, no matter where you are scrolled. Right now, the box always draws from the very top of the page, even if that part isn't visible to the user.
Trying to get the height of an element whose height is specified in the CSS.
So I am trying to animate the height of an item, where I have: <img id="myButton" src="myimage.jpg" /> <div id="myDiv" style="height:50px;overflow:hidden"> asdklf
[Code]....
However, it only registers as 50, even if the element is 500
on window load function i get the height of a control in a variable say 300px i have another DIV control below the first control and i wish to specify its TOP position depending on the height of the first control like document.getElementById('div1").style.top=htvariable+'5' but i am not able to get it to add it how to d oit
I have 2 div when one is clicked i want set the height of the other div equals the height of body the part of code is: ... <div onclick='document.getElementById("immagini").className="semitrasparenza"; document.getElementById("immagini").style.height=document.body.offsetHeight;' ></div> ...
why this works in opera but in ff release this error: "the property that has only getter"?
The cover group contains left & right bar images that repeat vertically as the page expands. The top is just a simple blue background (also content bg color)
Obviously content is the content of the page and both covergroup and content are within the subbody.
Is for the <subbody> tag to be the size of <content> + 5px on top (size of the <covertop>), and the left and right cover divs to expand to the size of subbody.
I guess since I'm using a footer (with image and text) letting the page expand as it wants is out, and I need javascript to make it work.
I have always been using Prototype but I finally made the switch to jQuery because of its good documentation and large user base.
I have a problem that I hope someone can solve. The problem is that I cannot correctly set a size of my dialog when loading the content using Ajax.
I have the following code:
The content is loaded but the dialog is not sized properly. I guess that it depends on the content being changed after the dialog has been initialized. Is there a nice way to solve this problem?
I tried the following solution (not very good looking but anyway...)
This causes the size to be correct but it doesnt center the window and it also removes scrollbars from the content. I must have the scrollbars but I want the dialog not to exceed the viewport.
Another solution is to download and use YET ANOTHER third party plugin but hey comeon, shouldnt jQuery UI be able to do this?
OK, I am very new to jQuery so bare with me here. I am trying to get the document body height and set it as the height of a table, after the page has been loaded. Below is an example of what I am trying to do.
[Code]...
I am not sure where to place the jQuery code, before or after the table tag...and I am not even sure if any of my jQuery code is correct. Once again, i need to set the table height AFTER the document has been loaded and then dynamically change the height of the table.
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.
I have a hidden popup that I populate with content and it dynamically expands to the size of the content. I then show the popup. When a user clicks on another link, it populates the popup with longer or shorter content. When the content is SHORTER, it seems to show the background image that I'm using expanding to the height of the previous size of the popup. I've tried setting the height manually with JS, no luck. This only happens on IE6.
Im trying to make a sticky footer and it works fine in all fo the browsers except ie, it wont add the needed height, when using height() it works but if i use innerHeight() it wont work, heres the code
I've been using the page [URL] as my guide to innerWidth/innerHeight, to resize an open browser window when the content switches from form A to form B. innerWidth/innerHeight appears to work in all non-IE browsers, but of this subset, non-Mozilla browsers seem to keep these properties read-only. And yes, I know Firefox, Opera, and others can disable Javascript resize of windows, but I would like to make this work as often as possible.
I have a list of images on my website, and I because of different resolutions on viewers screens, the total height of the div changes. I need to set the "top" value as the height of ".photoswrap".
I have 2 divs . The top blue one is of 30 px height, te bottom should stretch to 100 % -30 px. Can this be done somehow crossbrowser ? is there a way to do 100% -30 px ?
On the right site there is a box with a vertical scrollbar. It´s a DIV (id="right") with an iframe in it. Maybe I´ll put a DIV with overflow:auto in it but it doesn´t matter now.
The customer wants that this 'scrollbox' takes all available vertical space. That means it should start right under the header and end above the footer. But when there is much content and the user scrolls down the page the scrollbox has to stick under the top edge of the viewport.
Does anybody know how to realise this?
I think I can use JavaScript to get the y-position of the scrollbox and then change margin-top of the iframe or padding-bottom of DIV id="right" or whatever. Code:
I'm pretty new in JavaScript, so forgive me if that's a lammer question.Here it is: I had wrote some JavaScript to dynamically resize div elements on the client side. In fact the code works fine, but when resizing multiple (nested) divs in a roll not all of them gets resized. The reason is that the new size of the parrent element is not applyed yet when the script gets started for a child!
So my question is: Is there a way (method) to force new size of the parent before i call my script for the nex element? How can I solve this?
I have the non-standard element <testele></testele> In every browser except IE, this bit of JavaScript will successfully change the content of the above element: document.getElementsByTagName("testele")[0].innerHTML = 'hi'; However, if I change the <testele> to just a <span> (in the HTML and the JavaScript), it now successfully changes the content of the element in every browser, including IE.
I am making a small text editor for text areas on my website.Just to handle simple text formatting etc.I have an emoticon button which I want to display a <div> of all the emoticons below the actual emoticon button.I have the javascript code to find the left and top positions of the emoticon button, which spits out numbers that look correct.However in my show_emoticons function the left and top style setting is never getting set, in firebug they are just displayed as "".
when I try to get the height or any other graphic property of an element which is hidden (in my case, hidden in one jQuery UI tab), I can't manage to get the height of the element. If I do: $("#my_element").outerHeight() I get zero. Whereas If I do the same when the element is visible, I get its height. I work with jQuery 1.3.2 and FF 3.5.
How can I change the height and width of an element with Javascript? I have tried and so far I can only change either the width or height but not both, doing something like this…
Code:
<HTML> <HEAD> <script type = "text/javascript"> function changeSize(){document.getElementById('test').style.height = '200'}
[code]....
And this works fine but if I try to change both height and width it doesn’t work. Doing something like this doesn’t work
Code:
function changeSize(){document.getElementById('test').style.height = '200' width=’200’}
I'm doing some work on a theme and I'm using horizontal accordion scrollers.
You can see on my practice page that the three main sections (on the right) are all different sizes. The rightmost section has a big block of text but it is all cut off after 600px (which is what I have it set as).
Since this will be for a blog there will be different sized pages with every click but I can't seem to find a way to have the elements default the height based on the amount of content.
The accordion script uses MooTools and you can see everything I've done on my development page.
n the following script, I am trying to set selection to a select option element, that is newly created within the script. It works fine on IE installations on Windows 2000 and some XP machines. But on some XP machines, the selection doesn't happen and it defaults to the first element in the options array. Has anybody come across this problem ? Any known workarounds?