Hey all, I''m not sure if IE can support this, but I''m trying to get the dimensions of an element that has percentages for height/width. In the example code below, I''m trying to get the dimensions for the ''MyCell'' element. Firefox supports Element.getDimensions(''MyCell''), but IE returns 0 for the height & width returned by that call. Thanks Jim ___________________________________________ <table cellspacing="0" cellpadding="0" border="0" style="height:100%;width:100%"> <tr> <td> some text </td> </tr> <tr> <td> </td> </tr> <tr height="100%"> <td width="100%" id="MyCell" valign="top"> some other stuff </td> </tr> </table> _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
I''m not sure if this applies to your situation or not, but IE will not return dimensions for elements with position = absolute. In fact, I''m not sure it even does it for position = relative. Or maybe that''s only in certain circumstances. Greg ________________________________ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jim Geurts Sent: Monday, April 10, 2006 11:47 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] Element.getDimensions() support for IE? Hey all, I''m not sure if IE can support this, but I''m trying to get the dimensions of an element that has percentages for height/width. In the example code below, I''m trying to get the dimensions for the ''MyCell'' element. Firefox supports Element.getDimensions(''MyCell''), but IE returns 0 for the height & width returned by that call. Thanks Jim ___________________________________________ <table cellspacing="0" cellpadding="0" border="0" style="height:100%;width:100%"> <tr> <td> some text </td> </tr> <tr> <td> </td> </tr> <tr height="100%"> <td width="100%" id="MyCell" valign="top"> some other stuff </td> </tr> </table> _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Does it matter if you set the dimensions with CSS ? Matt -----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: 10 April 2006 18:51 To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] Element.getDimensions() support for IE? I''m not sure if this applies to your situation or not, but IE will not return dimensions for elements with position = absolute. In fact, I''m not sure it even does it for position = relative. Or maybe that''s only in certain circumstances. Greg _____ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jim Geurts Sent: Monday, April 10, 2006 11:47 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] Element.getDimensions() support for IE? Hey all, I''m not sure if IE can support this, but I''m trying to get the dimensions of an element that has percentages for height/width. In the example code below, I''m trying to get the dimensions for the ''MyCell'' element. Firefox supports Element.getDimensions(''MyCell''), but IE returns 0 for the height & width returned by that call. Thanks Jim ___________________________________________ <table cellspacing="0" cellpadding="0" border="0" style="height:100%;width:100%"> <tr> <td> some text </td> </tr> <tr> <td> </td> </tr> <tr height="100%"> <td width="100%" id="MyCell" valign="top"> some other stuff </td> </tr> </table> *********************************************************************************** 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
Maybe I can set an element inside that table cell to use a relative position. On 4/10/06, SPENDLOVE, Matt, GBM <Matt.SPENDLOVE-ge51qsjLezM@public.gmane.org> wrote:> > Does it matter if you set the dimensions with CSS ? > > Matt > > -----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:* 10 April 2006 18:51 > *To:* rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > *Subject:* RE: [Rails-spinoffs] Element.getDimensions() support for IE? > > I''m not sure if this applies to your situation or not, but IE will not > return dimensions for elements with position = absolute. In fact, I''m not > sure it even does it for position = relative. Or maybe that''s only in > certain circumstances. > > > > Greg > > > ------------------------------ > > *From:* rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto: > rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] *On Behalf Of *Jim Geurts > *Sent:* Monday, April 10, 2006 11:47 AM > *To:* rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > *Subject:* [Rails-spinoffs] Element.getDimensions() support for IE? > > > > Hey all, > > I''m not sure if IE can support this, but I''m trying to get the dimensions > of an element that has percentages for height/width. In the example code > below, I''m trying to get the dimensions for the ''MyCell'' element. Firefox > supports Element.getDimensions(''MyCell''), but IE returns 0 for the height > & width returned by that call. > > Thanks > > Jim > > > ___________________________________________ > > <table cellspacing="0" cellpadding="0" border="0" > style="height:100%;width:100%"> > <tr> > <td> > some text > </td> > </tr> > <tr> > <td> </td> > </tr> > <tr height="100%"> > <td width="100%" id="MyCell" valign="top"> > some other stuff > </td> > </tr> > </table> > > *********************************************************************************** > 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.comhttp://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
As far as I know, no. I ran into the problem when trying to make the drag-drop scroll the window whenever a part of the dragged element moved beyond the edge of the window, but in IE, the height and width were both 0 for the dragged element no matter what I did to it. So, I could only make it scroll based on the mouse cursor. Some items had fixed widths via CSS, others didn''t. So, I don''t think setting them makes a difference to IE. Once it''s absolutely positioned, it forgets the values. Of course, I''ve been wrong before, so if anyone knows better, chime in. Greg ________________________________ 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: Monday, April 10, 2006 11:55 AM To: ''rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org'' Subject: RE: [Rails-spinoffs] Element.getDimensions() support for IE? Does it matter if you set the dimensions with CSS ? Matt -----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: 10 April 2006 18:51 To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] Element.getDimensions() support for IE? I''m not sure if this applies to your situation or not, but IE will not return dimensions for elements with position = absolute. In fact, I''m not sure it even does it for position = relative. Or maybe that''s only in certain circumstances. Greg ________________________________ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jim Geurts Sent: Monday, April 10, 2006 11:47 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] Element.getDimensions() support for IE? Hey all, I''m not sure if IE can support this, but I''m trying to get the dimensions of an element that has percentages for height/width. In the example code below, I''m trying to get the dimensions for the ''MyCell'' element. Firefox supports Element.getDimensions(''MyCell''), but IE returns 0 for the height & width returned by that call. Thanks Jim ___________________________________________ <table cellspacing="0" cellpadding="0" border="0" style="height:100%;width:100%"> <tr> <td> some text </td> </tr> <tr> <td> </td> </tr> <tr height="100%"> <td width="100%" id="MyCell" valign="top"> some other stuff </td> </tr> </table> ************************************************************************ *********** 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