search for: offsetheight

Displaying 20 results from an estimated 24 matches for "offsetheight".

2006 Jan 19
2
how can I get offsetHeight in IE?
Ok, This is driving me nuts. I am trying to determine the height of an element in IE, but offsetHeight returns undefined. I looped through all of the attributes that contain the word ''height'', both in the element and in the element.style, but they are all undefined. Is there a better way to determine the rendered height of an element? Is there something I need to do to the eleme...
2006 Apr 26
12
RE: how to use Effect.BlindUp for resizing a div
var height = someElementReference.offsetHeight; and to set it: someElementReference.style.height = "100"; It is worth saying that offsetHeight and offsetWidth are non-standard compliance. They will give you the total rendering height and this will cause problems in IE since they use a different box model than FireFox. So you will...
2005 Jun 23
0
dragdrop library
...Int(draggable.element.offsetWidth)) > parseInt(Content.content.offsetWidth)) draggable.element.style.left = parseInt(Content.content.offsetWidth) - parseInt(draggable.element.offsetWidth) + ''px''; if ( (parseInt(draggable.element.style.top) + parseInt(draggable.element.offsetHeight)) > parseInt(Content.content.offsetHeight)) draggable.element.style.top = parseInt(Content.content.offsetHeight) - parseInt(draggable.element.offsetHeight) + ''px''; } } Content.init(''content''); // content is a container for the draggables...
2006 Mar 17
3
Element.getDimensions
Hi all, should it be considered a bug that Element.getDimensions returns the offsetWidth and offsetHeight properties from elemens having not display none, but clientWidth and clientHeight from elements with display none? Or is it a feature? Regards Lorenz
2006 Feb 08
2
Prototype: Position.clone()
...;absolute''; var offsets = this.cumulativeOffset(source); target.style.top = offsets[1] + ''px''; target.style.left = offsets[0] + ''px''; target.style.width = source.offsetWidth + ''px''; target.style.height = source.offsetHeight + ''px''; }, clone: function(source, target) { var options = Object.extend({ setLeft: true, setTop: true, setWidth: true, setHeight: true, offsetTop: 0, offsetLeft: 0 }, arguments[2] || {}) // find page position of sou...
2006 Jan 06
3
Protoype problem
Hey everybody, I encountered an interesting problem today. Here is what I have: I used the prototype function "Position.clone(src, target)" which actually copies the top, left, offsetWidth and offsetHeight from the src to the target. interestingly, my src-object had a css-styled border of 1px, and a total offsetWidth of 320px. my target-object had the same properties, but once I did the position-clone function, my target-object had a 322px width, because the width AND the border (1px on each side...
2008 Jun 05
0
Javascript & Scrolling
...#39;').innerHTML = ''changed: '' + v } }); // scroll the element vertically based on its width and the slider maximum value function scrollVertical(value, element, slider) { element.scrollTop = Math.round(value/ slider.maximum*(element.scrollHeight-element.offsetHeight)); } // scroll the element horizontally based on its width and the slider maximum value function scrollHorizontal(value, element, slider) { element.scrollLeft = Math.round(value/ slider.maximum*(element.scrollWidth-element.offsetWidth)); } // disable vertical scrolling if...
2005 Dec 15
1
Some handy methods - perhaps cool enough to be committed some time
...(element.style.display && element.style.display=="none"){ var visibility=element.style.visibility; element.style.visibility="hidden"; element.style.display=""; width=element.offsetWidth; height=element.offsetHeight; element.style.display="none"; element.style.visibility=visibility; } else{ width=element.offsetWidth; height=element.offsetHeight; } return new Geometry.Size(width,height); }, setSize:function(element...
2006 Apr 08
0
MSN like blind - BottomToTop
...th'',''height'',''fontSize''].each( function(k) { this.originalStyle[k] = this.element.style[k]; }.bind(this)); this.originalTop = this.element.offsetTop; this.originalLeft = this.element.offsetLeft; this.originalHeight = this.element.offsetHeight; this.originalWidth = this.element.offsetWidth; this.factor = (this.options.scaleTo - this.options.scaleFrom)/100; this.dims = null; if(this.options.scaleMode==''box'') this.dims = [this.element.offsetHeight, this.element.offsetWidth]; if(/^content/.test(...
2006 May 08
2
prototype getHeight safari
Hi I have a weird bug with getHeight or getDimensions().hegiht (prototype) only on safari if I have a html file like this <div id="test"></div> and a embedded css <style> #test { width:100px; height:100px; float:left; } </style> In Safari $(''test'').getHeight returns 100, fine but if the css declaration #test.. is in a css file
2006 Mar 09
0
RE: question about auto-updating divwithoverflow:auto and maintaining position
...ensure bottom is hit, > > like 10,000). what I ended up doing is this: <div id="wrap" style="overflow:auto"> <div id="inner"></div> </div> then in my javascript I did: $(''wrap'').scrollTop = $(''inner'').offsetHeight; > good call :) Now to figure out if the user is actually scrolled all the > way to the bottom (I figure I won''t force a scroll if they aren''t at the > bottom, signalling to me that they''ve scrolled themselves :) I went the lazy route and added a checkbox ;)...
2006 Feb 18
0
Move element into view
...{ setup: function() { Position.prepare(); this.scrollStart = Position.deltaY; var offsets = Position.cumulativeOffset(this.element); var rand = 0; if(this.options.offset) rand = this.options.offset; var element_kante_oben = offsets[1]; var element_hoehe = this.element.offsetHeight; // Länge und Position des dargestellten Ausschnitts relativ zum gesamten Dokument var screen_bottom, screen_height, screen_scrolled; if (isIE){ screen_height = document.documentElement.clientHeight; screen_scrolled = document.documentElement.scrollTop; } else { s...
2005 Aug 28
0
Position.clone and scroll offsets
...s = this.realOffset(source); // ### new target.style.top = (offsets[1] - scrolls[1]) + ''px''; target.style.left = (offsets[0] - scrolls[0]) + ''px''; target.style.width = source.offsetWidth + ''px''; target.style.height = source.offsetHeight + ''px''; } } -- Michael Schuerig Life is just as deadly mailto:michael@schuerig.de As it looks http://www.schuerig.de/michael/ --Richard Thompson, Sibella
2005 Dec 14
1
[scriptaculous] scroll down to show full auto completion list (w/ possible patch)
Hi everyone, lately I''ve implemented an auto completion textfield at the bottom of a form. I was a bit bothered by the fact that the user would potentially need to scroll down in order to see all the options offered by the auto completion. I couldn''t find any information on how to auto scroll to the auto completion list with bulit-in functionality so I modified controls.js
2006 Jan 30
0
Draggable with auto-scroll
...//var p = Position.page(this.options.scroll); var p = Position.cumulativeOffset(this.options.scroll); //p[0] += this.options.scroll.scrollLeft; //p[1] += this.options.scroll.scrollTop; p.push(p[0]+this.options.scroll.offsetWidth); p.push(p[1]+this.options.scroll.offsetHeight); var speed = [0,0]; if(pointer[0] < (p[0]+this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[0]+this.options.scrollSensitivity); if(pointer[1] < (p[1]+this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[1]+this.options.scrollSensitivity); if(pointer[0...
2005 Nov 04
19
Drag & Scroll
When using drag and drop, the browser window will not scroll if you move the mouse off the page. This makes it very difficult, if not impossible to create certain types of web applications. I know this has been mentioned before and is on the Wish List, but it''s very frustrating. If you look at this other Javascript library called "Drag''nDrop & DHTML Library"
2005 Jul 28
2
CSS and autocompleter
hi. I''m rewriting the code from my own save-yourself-if-you-can implementation of xmlhttprequest to scriptaculous autocompleter, and it''s all fine and dandy, except that I am having difficulty positioning the auto_complete div which contains the results returned by xmlhttprequest. the auto_complete div is always stuck in one place, it starts a little below and half
2006 Mar 08
2
RE: question about auto-updating div withoverflow:auto and maintaining position
You should be able to do this by changing the div''s .scrollTop value via javascript (maybe just pick a very large number to ensure bottom is hit, like 10,000). -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jeremy Kitchen Sent:
2005 Sep 15
4
Scrolling Tables/Divs?
Is anyone working on a scrolling table or div such as the openrico livegrid demo? I''m looking to develop (much like smashbox''s scrolling images) a collection of thumbnails that you can scroll horizontally. I''ve got a non-prototype.js example but I wanted to check to see if anyone was closer than I to this. BTW, I will be finishing up my slider code shortly and
2006 Mar 17
1
Autocompleter.Local problem/desparate plea for help...
I have been trying to write a selector function for Autocompleter.Local that will show a predefined Array and will scroll automatically to the first match. I have had success with with getting my list to populate and show all of the choices, however I cannot get it to scroll to the first match. Since I build the JS Array I can know exactly how many items are in the list going into my selector,