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 are wondering about it...) For setting the height, this is a CSS declaration and can use any valid CSS value. The default is pixels but you can use other such as em. Andrew Paul Martinez -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Joe Hudson Sent: Wednesday, April 26, 2006 9:44 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp for resizing a div If no one has an answer to this, would anybody be able to tell me how to do the following: - how to get the height of a block element - how to set the height of a block element I''m sure these are trivial but I just haven''t found the correct methods to do so. Thanks very much. Joe> -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs- > bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Joe Hudson > Sent: Tuesday, April 25, 2006 10:59 AM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: [Rails-spinoffs] how to use Effect.BlindUp for resizing a div > > I would like to resize a div to half the size that it was and would like > to > use the BlindUp transition. I think that I need the scaleTo parameter > from > the docs: http://wiki.script.aculo.us/scriptaculous/show/Effect.BlindDown > But this doesn''t exactly work. > > new Effect.BlindUp(gridId, {scaleTo: 50}); > > What happens is that the div does the blind up transition until it is half > the original size then it disappears. Is there any way I can not make the > div disappear? Thanks for your help. > > Joe > > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
SPENDLOVE, Matt, GBM
2006-Apr-26 13:58 UTC
RE: how to use Effect.BlindUp for resizing a div
FYI prototype lib has Element.getHeight() which wraps up the offset height call.. Matt> -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On > Behalf Of Martinez, Andrew > Sent: 26 April 2006 14:52 > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: RE: [Rails-spinoffs] 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 > are wondering about it...) > > For setting the height, this is a CSS declaration and can use > any valid CSS value. The default is pixels but you can use > other such as em. > > Andrew Paul Martinez > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On > Behalf Of Joe Hudson > Sent: Wednesday, April 26, 2006 9:44 AM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp > for resizing a div > > If no one has an answer to this, would anybody be able to > tell me how to do the following: > > - how to get the height of a block element > - how to set the height of a block element > > I''m sure these are trivial but I just haven''t found the > correct methods to do so. Thanks very much. > > Joe > > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs- bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > > Joe Hudson > > Sent: Tuesday, April 25, 2006 10:59 AM > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: [Rails-spinoffs] how to use Effect.BlindUp for > resizing a div > > > > I would like to resize a div to half the size that it was and would > > like to use the BlindUp transition. I think that I need > the scaleTo > > parameter from > > the docs: > http://wiki.script.aculo.us/scriptaculous/show/Effect.BlindDown > > But this doesn''t exactly work. > > > > new Effect.BlindUp(gridId, {scaleTo: 50}); > > > > What happens is that the div does the blind up transition > until it is > > half the original size then it disappears. Is there any > way I can not > > make the div disappear? Thanks for your help. > > > > Joe > > > > > > > > _______________________________________________ > > Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > > _______________________________________________ > Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > _______________________________________________ > Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >*********************************************************************************** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorized and regulated by the Financial Services Authority This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our websites at: http://www.rbos.com http://www.rbsmarkets.com ***********************************************************************************
Code from prototype: getHeight: function(element) { element = $(element); return element.offsetHeight; }, One can use this function and if there ever is a standard (which there probably won''t since the W3C is against any and all post render calculation standards) this function would effectively update your API once prototype is enhanced to accept the change. Either way, I say learn how it works, then use the API. Thank you Matt for pointing out that function, I didn''t know it existed. Andrew Paul Martinez Software Engineer, Associate Paetec - Pinnacle 585-340-8455 -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of SPENDLOVE, Matt, GBM Sent: Wednesday, April 26, 2006 9:58 AM To: ''rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org'' Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp for resizing a div FYI prototype lib has Element.getHeight() which wraps up the offset height call.. Matt> -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On > Behalf Of Martinez, Andrew > Sent: 26 April 2006 14:52 > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: RE: [Rails-spinoffs] 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 > are wondering about it...) > > For setting the height, this is a CSS declaration and can use > any valid CSS value. The default is pixels but you can use > other such as em. > > Andrew Paul Martinez > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On > Behalf Of Joe Hudson > Sent: Wednesday, April 26, 2006 9:44 AM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp > for resizing a div > > If no one has an answer to this, would anybody be able to > tell me how to do the following: > > - how to get the height of a block element > - how to set the height of a block element > > I''m sure these are trivial but I just haven''t found the > correct methods to do so. Thanks very much. > > Joe > > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs- bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > > Joe Hudson > > Sent: Tuesday, April 25, 2006 10:59 AM > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: [Rails-spinoffs] how to use Effect.BlindUp for > resizing a div > > > > I would like to resize a div to half the size that it was and would > > like to use the BlindUp transition. I think that I need > the scaleTo > > parameter from > > the docs: > http://wiki.script.aculo.us/scriptaculous/show/Effect.BlindDown > > But this doesn''t exactly work. > > > > new Effect.BlindUp(gridId, {scaleTo: 50}); > > > > What happens is that the div does the blind up transition > until it is > > half the original size then it disappears. Is there any > way I can not > > make the div disappear? Thanks for your help. > > > > Joe > > > > > > > > _______________________________________________ > > Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > > _______________________________________________ > Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > _______________________________________________ > Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >*********************************************************************************** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorized and regulated by the Financial Services Authority This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our websites at: http://www.rbos.com http://www.rbsmarkets.com *********************************************************************************** _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Thank you all very much. This is exactly what I was looking for. Is there a setHeight function? Joe> -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs- > bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Martinez, Andrew > Sent: Wednesday, April 26, 2006 10:03 AM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp for resizing a div > > Code from prototype: > > getHeight: function(element) { > element = $(element); > return element.offsetHeight; > }, > > > One can use this function and if there ever is a standard (which > there probably won''t since the W3C is against any and all post render > calculation standards) this function would effectively update your API > once prototype is enhanced to accept the change. Either way, I say learn > how it works, then use the API. > > Thank you Matt for pointing out that function, I didn''t know it existed. > > Andrew Paul Martinez > Software Engineer, Associate > Paetec - Pinnacle > 585-340-8455 > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails- > spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of SPENDLOVE, Matt, GBM > Sent: Wednesday, April 26, 2006 9:58 AM > To: ''rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org'' > Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp for resizinga> div > > FYI prototype lib has Element.getHeight() which wraps up the offset height > call.. > > Matt > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On > > Behalf Of Martinez, Andrew > > Sent: 26 April 2006 14:52 > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: RE: [Rails-spinoffs] 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 > > are wondering about it...) > > > > For setting the height, this is a CSS declaration and can use > > any valid CSS value. The default is pixels but you can use > > other such as em. > > > > Andrew Paul Martinez > > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On > > Behalf Of Joe Hudson > > Sent: Wednesday, April 26, 2006 9:44 AM > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp > > for resizing a div > > > > If no one has an answer to this, would anybody be able to > > tell me how to do the following: > > > > - how to get the height of a block element > > - how to set the height of a block element > > > > I''m sure these are trivial but I just haven''t found the > > correct methods to do so. Thanks very much. > > > > Joe > > > > > > > -----Original Message----- > > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > [mailto:rails-spinoffs- bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > > > Joe Hudson > > > Sent: Tuesday, April 25, 2006 10:59 AM > > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > Subject: [Rails-spinoffs] how to use Effect.BlindUp for > > resizing a div > > > > > > I would like to resize a div to half the size that it was and would > > > like to use the BlindUp transition. I think that I need > > the scaleTo > > > parameter from > > > the docs: > > http://wiki.script.aculo.us/scriptaculous/show/Effect.BlindDown > > > But this doesn''t exactly work. > > > > > > new Effect.BlindUp(gridId, {scaleTo: 50}); > > > > > > What happens is that the div does the blind up transition > > until it is > > > half the original size then it disappears. Is there any > > way I can not > > > make the div disappear? Thanks for your help. > > > > > > Joe > > > > > > > > > > > > _______________________________________________ > > > Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > > > > > > > _______________________________________________ > > Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > > Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > ************************************************************************** > ********* > The Royal Bank of Scotland plc. Registered in Scotland No 90312. > Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. > Authorized and regulated by the Financial Services Authority > > This e-mail message is confidential and for use by the > addressee only. If the message is received by anyone other > than the addressee, please return the message to the sender > by replying to it and then delete the message from your > computer. Internet e-mails are not necessarily secure. The > Royal Bank of Scotland plc does not accept responsibility for > changes made to this message after it was sent. > > Whilst all reasonable care has been taken to avoid the > transmission of viruses, it is the responsibility of the recipient to > ensure that the onward transmission, opening or use of this > message and any attachments will not adversely affect its > systems or data. No responsibility is accepted by The Royal > Bank of Scotland plc in this regard and the recipient should carry > out such virus and other checks as it considers appropriate. > Visit our websites at: > http://www.rbos.com > http://www.rbsmarkets.com > ************************************************************************** > ********* > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
SPENDLOVE, Matt, GBM
2006-Apr-26 14:11 UTC
RE: how to use Effect.BlindUp for resizing a div
''fraid not. I have one of these next to my desk which might help you <http://www.snook.ca/archives/prototype.png>. Of course, the code is always the definitive doc ! Matt> -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On > Behalf Of Joe Hudson > Sent: 26 April 2006 15:09 > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp for > resizing a div > > > Thank you all very much. This is exactly what I was looking > for. Is there a setHeight function? > > Joe > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs- bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > > Martinez, Andrew > > Sent: Wednesday, April 26, 2006 10:03 AM > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp for > resizing a div > > > > Code from prototype: > > > > getHeight: function(element) { > > element = $(element); > > return element.offsetHeight; > > }, > > > > > > One can use this function and if there ever is a > standard (which > > there probably won''t since the W3C is against any and all > post render > > calculation standards) this function would effectively > update your API > > once prototype is enhanced to accept the change. Either way, I say > > learn how it works, then use the API. > > > > Thank you Matt for pointing out that function, I didn''t know it > > existed. > > > > Andrew Paul Martinez > > Software Engineer, Associate > > Paetec - Pinnacle > > 585-340-8455 > > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails- > > spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > SPENDLOVE, Matt, GBM > > Sent: Wednesday, April 26, 2006 9:58 AM > > To: ''rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org'' > > Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp > for resizing > a > > div > > > > FYI prototype lib has Element.getHeight() which wraps up the offset > > height call.. > > > > Matt > > > > > -----Original Message----- > > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On > Behalf Of > > > Martinez, Andrew > > > Sent: 26 April 2006 14:52 > > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > Subject: RE: [Rails-spinoffs] 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 are wondering about it...) > > > > > > For setting the height, this is a CSS declaration and can use any > > > valid CSS value. The default is pixels but you can use > other such as > > > em. > > > > > > Andrew Paul Martinez > > > > > > -----Original Message----- > > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On > Behalf Of > > > Joe Hudson > > > Sent: Wednesday, April 26, 2006 9:44 AM > > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp > > > for resizing a div > > > > > > If no one has an answer to this, would anybody be able to tell me > > > how to do the following: > > > > > > - how to get the height of a block element > > > - how to set the height of a block element > > > > > > I''m sure these are trivial but I just haven''t found the correct > > > methods to do so. Thanks very much. > > > > > > Joe > > > > > > > > > > -----Original Message----- > > > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > [mailto:rails-spinoffs- bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] > On Behalf > > > > Of Joe Hudson > > > > Sent: Tuesday, April 25, 2006 10:59 AM > > > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > Subject: [Rails-spinoffs] how to use Effect.BlindUp for > > > resizing a div > > > > > > > > I would like to resize a div to half the size that it was and > > > > would like to use the BlindUp transition. I think that I need > > > the scaleTo > > > > parameter from > > > > the docs: > > > http://wiki.script.aculo.us/scriptaculous/show/Effect.BlindDown > > > > But this doesn''t exactly work. > > > > > > > > new Effect.BlindUp(gridId, {scaleTo: 50}); > > > > > > > > What happens is that the div does the blind up transition > > > until it is > > > > half the original size then it disappears. Is there any > > > way I can not > > > > make the div disappear? Thanks for your help. > > > > > > > > Joe > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > > > > > > > > > > > > _______________________________________________ > > > Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > _______________________________________________ > > > Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > > > > ********************************************************************** > > **** > > ********* > > The Royal Bank of Scotland plc. Registered in Scotland No 90312. > > Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. > > Authorized and regulated by the Financial Services Authority > > > > This e-mail message is confidential and for use by the > addressee only. > > If the message is received by anyone other than the > addressee, please > > return the message to the sender by replying to it and then > delete the > > message from your computer. Internet e-mails are not necessarily > > secure. The Royal Bank of Scotland plc does not accept > responsibility > > for changes made to this message after it was sent. > > > > Whilst all reasonable care has been taken to avoid the > transmission of > > viruses, it is the responsibility of the recipient to > ensure that the > > onward transmission, opening or use of this message and any > > attachments will not adversely affect its systems or data. No > > responsibility is accepted by The Royal Bank of Scotland > plc in this > > regard and the recipient should carry out such virus and > other checks > > as it considers appropriate. Visit our websites at: > > http://www.rbos.com > > http://www.rbsmarkets.com > > > ************************************************************** > ************ > > ********* > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > > _______________________________________________ > Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
Quick run through by opening prototype.js and doing a search for setHeight found nothing. Seems like you are stuck with element.style.height = "<val>" or you could write your own wrapper, but that seems unnecessary. -Andrew Martinez -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Joe Hudson Sent: Wednesday, April 26, 2006 10:09 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp for resizing a div Thank you all very much. This is exactly what I was looking for. Is there a setHeight function? Joe> -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs- > bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Martinez, Andrew > Sent: Wednesday, April 26, 2006 10:03 AM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp for resizing a div > > Code from prototype: > > getHeight: function(element) { > element = $(element); > return element.offsetHeight; > }, > > > One can use this function and if there ever is a standard (which > there probably won''t since the W3C is against any and all post render > calculation standards) this function would effectively update your API > once prototype is enhanced to accept the change. Either way, I say learn > how it works, then use the API. > > Thank you Matt for pointing out that function, I didn''t know it existed. > > Andrew Paul Martinez > Software Engineer, Associate > Paetec - Pinnacle > 585-340-8455 > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails- > spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of SPENDLOVE, Matt, GBM > Sent: Wednesday, April 26, 2006 9:58 AM > To: ''rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org'' > Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp for resizinga> div > > FYI prototype lib has Element.getHeight() which wraps up the offset height > call.. > > Matt > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On > > Behalf Of Martinez, Andrew > > Sent: 26 April 2006 14:52 > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: RE: [Rails-spinoffs] 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 > > are wondering about it...) > > > > For setting the height, this is a CSS declaration and can use > > any valid CSS value. The default is pixels but you can use > > other such as em. > > > > Andrew Paul Martinez > > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On > > Behalf Of Joe Hudson > > Sent: Wednesday, April 26, 2006 9:44 AM > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp > > for resizing a div > > > > If no one has an answer to this, would anybody be able to > > tell me how to do the following: > > > > - how to get the height of a block element > > - how to set the height of a block element > > > > I''m sure these are trivial but I just haven''t found the > > correct methods to do so. Thanks very much. > > > > Joe > > > > > > > -----Original Message----- > > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > [mailto:rails-spinoffs- bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > > > Joe Hudson > > > Sent: Tuesday, April 25, 2006 10:59 AM > > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > Subject: [Rails-spinoffs] how to use Effect.BlindUp for > > resizing a div > > > > > > I would like to resize a div to half the size that it was and would > > > like to use the BlindUp transition. I think that I need > > the scaleTo > > > parameter from > > > the docs: > > http://wiki.script.aculo.us/scriptaculous/show/Effect.BlindDown > > > But this doesn''t exactly work. > > > > > > new Effect.BlindUp(gridId, {scaleTo: 50}); > > > > > > What happens is that the div does the blind up transition > > until it is > > > half the original size then it disappears. Is there any > > way I can not > > > make the div disappear? Thanks for your help. > > > > > > Joe > > > > > > > > > > > > _______________________________________________ > > > Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > > > > > > > _______________________________________________ > > Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > > Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > ************************************************************************** > ********* > The Royal Bank of Scotland plc. Registered in Scotland No 90312. > Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. > Authorized and regulated by the Financial Services Authority > > This e-mail message is confidential and for use by the > addressee only. If the message is received by anyone other > than the addressee, please return the message to the sender > by replying to it and then delete the message from your > computer. Internet e-mails are not necessarily secure. The > Royal Bank of Scotland plc does not accept responsibility for > changes made to this message after it was sent. > > Whilst all reasonable care has been taken to avoid the > transmission of viruses, it is the responsibility of the recipient to > ensure that the onward transmission, opening or use of this > message and any attachments will not adversely affect its > systems or data. No responsibility is accepted by The Royal > Bank of Scotland plc in this regard and the recipient should carry > out such virus and other checks as it considers appropriate. > Visit our websites at: > http://www.rbos.com > http://www.rbsmarkets.com > ************************************************************************** > ********* > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
WOW! That illustration is great! Thank you very much, Matt. Joe> -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs- > bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of SPENDLOVE, Matt, GBM > Sent: Wednesday, April 26, 2006 10:12 AM > To: ''rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org'' > Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp for resizing a div > > ''fraid not. > > I have one of these next to my desk which might help you > <http://www.snook.ca/archives/prototype.png>. Of course, the code is > always > the definitive doc ! > > Matt > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On > > Behalf Of Joe Hudson > > Sent: 26 April 2006 15:09 > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp for > > resizing a div > > > > > > Thank you all very much. This is exactly what I was looking > > for. Is there a setHeight function? > > > > Joe > > > > > -----Original Message----- > > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > [mailto:rails-spinoffs- bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > > > Martinez, Andrew > > > Sent: Wednesday, April 26, 2006 10:03 AM > > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp for > > resizing a div > > > > > > Code from prototype: > > > > > > getHeight: function(element) { > > > element = $(element); > > > return element.offsetHeight; > > > }, > > > > > > > > > One can use this function and if there ever is a > > standard (which > > > there probably won''t since the W3C is against any and all > > post render > > > calculation standards) this function would effectively > > update your API > > > once prototype is enhanced to accept the change. Either way, I say > > > learn how it works, then use the API. > > > > > > Thank you Matt for pointing out that function, I didn''t know it > > > existed. > > > > > > Andrew Paul Martinez > > > Software Engineer, Associate > > > Paetec - Pinnacle > > > 585-340-8455 > > > > > > -----Original Message----- > > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails- > > > spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > > SPENDLOVE, Matt, GBM > > > Sent: Wednesday, April 26, 2006 9:58 AM > > > To: ''rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org'' > > > Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp > > for resizing > > a > > > div > > > > > > FYI prototype lib has Element.getHeight() which wraps up the offset > > > height call.. > > > > > > Matt > > > > > > > -----Original Message----- > > > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On > > Behalf Of > > > > Martinez, Andrew > > > > Sent: 26 April 2006 14:52 > > > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > Subject: RE: [Rails-spinoffs] 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 are wondering about it...) > > > > > > > > For setting the height, this is a CSS declaration and can use any > > > > valid CSS value. The default is pixels but you can use > > other such as > > > > em. > > > > > > > > Andrew Paul Martinez > > > > > > > > -----Original Message----- > > > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On > > Behalf Of > > > > Joe Hudson > > > > Sent: Wednesday, April 26, 2006 9:44 AM > > > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp > > > > for resizing a div > > > > > > > > If no one has an answer to this, would anybody be able to tell me > > > > how to do the following: > > > > > > > > - how to get the height of a block element > > > > - how to set the height of a block element > > > > > > > > I''m sure these are trivial but I just haven''t found the correct > > > > methods to do so. Thanks very much. > > > > > > > > Joe > > > > > > > > > > > > > -----Original Message----- > > > > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > > [mailto:rails-spinoffs- bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] > > On Behalf > > > > > Of Joe Hudson > > > > > Sent: Tuesday, April 25, 2006 10:59 AM > > > > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > > Subject: [Rails-spinoffs] how to use Effect.BlindUp for > > > > resizing a div > > > > > > > > > > I would like to resize a div to half the size that it was and > > > > > would like to use the BlindUp transition. I think that I need > > > > the scaleTo > > > > > parameter from > > > > > the docs: > > > > http://wiki.script.aculo.us/scriptaculous/show/Effect.BlindDown > > > > > But this doesn''t exactly work. > > > > > > > > > > new Effect.BlindUp(gridId, {scaleTo: 50}); > > > > > > > > > > What happens is that the div does the blind up transition > > > > until it is > > > > > half the original size then it disappears. Is there any > > > > way I can not > > > > > make the div disappear? Thanks for your help. > > > > > > > > > > Joe > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > _______________________________________________ > > > > Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > > > > > > > > ********************************************************************** > > > **** > > > ********* > > > The Royal Bank of Scotland plc. Registered in Scotland No 90312. > > > Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. > > > Authorized and regulated by the Financial Services Authority > > > > > > This e-mail message is confidential and for use by the > > addressee only. > > > If the message is received by anyone other than the > > addressee, please > > > return the message to the sender by replying to it and then > > delete the > > > message from your computer. Internet e-mails are not necessarily > > > secure. The Royal Bank of Scotland plc does not accept > > responsibility > > > for changes made to this message after it was sent. > > > > > > Whilst all reasonable care has been taken to avoid the > > transmission of > > > viruses, it is the responsibility of the recipient to > > ensure that the > > > onward transmission, opening or use of this message and any > > > attachments will not adversely affect its systems or data. No > > > responsibility is accepted by The Royal Bank of Scotland > > plc in this > > > regard and the recipient should carry out such virus and > > other checks > > > as it considers appropriate. Visit our websites at: > > > http://www.rbos.com > > > http://www.rbsmarkets.com > > > > > ************************************************************** > > ************ > > > ********* > > > _______________________________________________ > > > Rails-spinoffs mailing list > > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > _______________________________________________ > > > Rails-spinoffs mailing list > > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > > > > > > > _______________________________________________ > > Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
One thing to keep in mind is that offsetHeight and offsetWidth do not work with absolutely or relatively positioned elements in IE. So, if you want to get the height and have it positioned, apply the positioning via javascript, after you capture the height. Not sure if you need that, but it''s something I''ve discovered through many frustrating hours of yelling at IE, so I thought I''d save you the pain in advance :) Greg
What versions of IE? I believe I am routinely using offsetHeight and offsetWidth on elements that are positioned absolutely... -Andrew Martinez -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Gregory Hill Sent: Wednesday, April 26, 2006 11:07 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp for resizing a div One thing to keep in mind is that offsetHeight and offsetWidth do not work with absolutely or relatively positioned elements in IE. So, if you want to get the height and have it positioned, apply the positioning via javascript, after you capture the height. Not sure if you need that, but it''s something I''ve discovered through many frustrating hours of yelling at IE, so I thought I''d save you the pain in advance :) Greg _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
> What versions of IE? I believe I am routinely using offsetHeight and > offsetWidth on elements that are positioned absolutely...IE 6 - if you are, then maybe there is some extra factor that I''m not considering. It returns 0 for me on positioned elements no matter what else I try to change. Greg
>IE 6 - if you are, then maybe there is some extra factor that I''m not >considering. It returns 0 for me on positioned elements no matter what >else I try to change.At any time are you specifically setting the width/height in CSS? I do and that is the only thing I can think of that would make a difference. My values are usually in explicit pixels or em''s. -Andrew Martinez -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Gregory Hill Sent: Wednesday, April 26, 2006 12:02 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp for resizing a div> What versions of IE? I believe I am routinely using offsetHeight and > offsetWidth on elements that are positioned absolutely...IE 6 - if you are, then maybe there is some extra factor that I''m not considering. It returns 0 for me on positioned elements no matter what else I try to change. Greg _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>>IE 6 - if you are, then maybe there is some extra factor that I''m not >>considering. It returns 0 for me on positioned elements no matter what >else I try to change. >At any time are you specifically setting the width/height in CSS? I do and that is the only thing I can think of that would make a difference. My values are >usually in explicit pixels or em''s.I just thought of one more thing, for offsetHeight/offsetWidth to work, the item must be "rendered" first, meaning you have to set display="block". I am not sure, but doing 1) set visibility="hidden" then 2) display="block" 3) alter widths/heights if needed, then 4) visibility="visible" might work if you are trying to avoid visible resizing. Not sure though, just a passing thought if you have time to investigate. I''ll queue it on my list of things to look into though. -Andrew Martinez -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Martinez, Andrew Sent: Wednesday, April 26, 2006 12:05 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp for resizing a div>IE 6 - if you are, then maybe there is some extra factor that I''m not >considering. It returns 0 for me on positioned elements no matter what >else I try to change.At any time are you specifically setting the width/height in CSS? I do and that is the only thing I can think of that would make a difference. My values are usually in explicit pixels or em''s. -Andrew Martinez -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Gregory Hill Sent: Wednesday, April 26, 2006 12:02 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] how to use Effect.BlindUp for resizing a div> What versions of IE? I believe I am routinely using offsetHeight and > offsetWidth on elements that are positioned absolutely...IE 6 - if you are, then maybe there is some extra factor that I''m not considering. It returns 0 for me on positioned elements no matter what else I try to change. Greg _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
> At any time are you specifically setting the width/height in CSS? I doand> that is the only thing I can think of that would make a difference. My > values are usually in explicit pixels or em''s.Nope, I am not. I guess that''s the difference. I was using it to determine the size of an item being dragged so I could scroll the window whenever the dragged item moved outside the currently scrolled area (instead of basing it on the position of the mouse). I had to drop the idea because there was no way to get IE to do it. Greg