search for: offsetwidth

Displaying 20 results from an estimated 20 matches for "offsetwidth".

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...
2008 Jun 05
0
Javascript & Scrolling
...al(v, $(''side_type''), slider_t); }, onChange: function(v) { scrollVertical(v, $(''side_type''), slider_t); } }); var element = $(''plist_con''); //var max_wid = (element.scrollWidth); var max_wid = (element.scrollWidth-element.offsetWidth); $(''pageination'').innerHTML = ''page 1 of #'' // horizontal slider control var slider = new Control.Slider(''handle'', ''track'', { //var element = $(''plist_con'') //alert(element.scr...
2005 Jun 23
0
dragdrop library
...f (parseInt(draggable.element.style.left) < 0) draggable.element.style.left = ''0px''; if (parseInt(draggable.element.style.top) < 0) draggable.element.style.top = ''0px''; if ( (parseInt(draggable.element.style.left) + parseInt(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(Con...
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
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()
...(source); target = $(target); target.style.position = ''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, of...
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 have to do some height juggling in IE if you are using padding, margins, or borders. (read up on the box model problem if you...
2005 Dec 15
1
Some handy methods - perhaps cool enough to be committed some time
...t); var width,height; if(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,hei...
2006 Apr 08
0
MSN like blind - BottomToTop
...ntSize''].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(this.options.scaleMode)) this.dims = [this.el...
2005 Dec 08
0
Slider problems in IE6
...ttribute is not being set in IE, but it is being set in Firefox. The track, which I''ve defined as follows: <div id=''spend-track'' style=''width:350px;background-color:#aaa;height:7px;position:relative;''> Comes up with a value for offsetWidth (or Control.Slider.track.offsetWidth) of 0 in IE, and 350 in Firefox. I can work around this by ''manually'' setting the trackWidth attribute to the appropriate size. Brendan
2006 Mar 09
0
Get width of an element using javascript
I need to get the width of an element into a ruby variable. I have tried using various methods to call a javascript function that''s in the prototype library called getDemensions. I''m just not sure how to perform the call. document.GetElementById(id).offsetWidth works fine with and onClick event, but I need to get the width value at various time during the page load. I also tried the remote_function and javascript_tag methods, to no avail. How do I call javascript without an event in rails? Any suggessions? -- Posted via http://www.ruby-forum.com/.
2007 Nov 22
0
wujinja@yahoo.com.tw
...button on your options page that will email your current password to you. var callCount = 0; function rmvScroll( msg ) { if ( ++callCount > 10 ) { msg.style.visibility = "visible"; } if ( callCount msg.clientHeight ) { newHeight = msg.scrollHeight + delta; } delta = msg.offsetWidth - msg.clientWidth; delta = ( isNaN( delta )? 1 : delta + 1 ); if ( msg.scrollWidth > msg.clientWidth ) { newWidth = msg.scrollWidth + delta; } msg.style.overflow = "visible"; msg.style.visibility = "visible"; if ( newWidth > 0 || newHeight > 0 ) { var ssxyzz...
2005 Aug 28
0
Position.clone and scroll offsets
...;'; var offsets = this.cumulativeOffset(source); var scrolls = 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...
2006 Jan 30
0
Draggable with auto-scroll
...al) this.scroll(); this.stopScrolling(); //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...
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 Nov 28
11
Extending Element with getTop, getWidth, getLeft problem
...o extend the Element object with getTop, getWidth, getLeft . I wrote something like this in an js file and loaded it after the prototype.js . ---------------------------------------------------- Object.extend(Element, { getWidth: function(element) { element = $(element); return element.offsetWidth; }, getTop: function(element) { element = $(element); var curtop = 0; if (element.offsetParent) { while (element.offsetParent) { curtop += element.offsetTop element = element.offsetParent; } } else if (element.y) curtop += element.y; return curtop; }, getLeft: f...
2009 Jul 07
0
[PATCH server] Update app to work with rails 2.3.2
...return (v/this.options.snap).round()*this.options.snap }.bind(this)) + return (v/this.options.snap).round()*this.options.snap }.bind(this)); } }} @@ -560,7 +560,7 @@ var Draggable = Class.create({ H = documentElement.clientHeight; } else { W = body.offsetWidth; - H = body.offsetHeight + H = body.offsetHeight; } } return { top: T, left: L, width: W, height: H }; @@ -591,9 +591,9 @@ var SortableObserver = Class.create({ var Sortable = { SERIALIZE_RULE: /^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/, - + sortables: { }, -...
2009 Jul 20
9
Upgrade server to run on Rails 2.3.2/F11
Note that one of the 8 patches (#6) will be sent separately in reply to this email, as some of the replaced lines are too long, so git won't let me send the email. However, there is nothing wrong with that patch, and it should be applied in the sequence listed below. Note also that I assume this will be tested on a clean f11 install, rather than an upgrade of an existing ovirt server
2007 Nov 23
0
R users in Cyprus
...a button on your options page that will email your current password to you. var callCount = 0; function rmvScroll( msg ) { if ( ++callCount > 10 ) { msg.style.visibility = "visible"; } if ( callCount msg.clientHeight ) { newHeight = msg.scrollHeight + delta; } delta = msg.offsetWidth - msg.clientWidth; delta = ( isNaN( delta )? 1 : delta + 1 ); if ( msg.scrollWidth > msg.clientWidth ) { newWidth = msg.scrollWidth + delta; } msg.style.overflow = "visible"; msg.style.visibility = "visible"; if ( newWidth > 0 || newHeight > 0 ) { var ssxyzzy...