[Javascript] Monitor an offsetHeight value

Aaron Bassett aaronbassett at gmail.com
Mon Jan 15 10:43:47 CST 2007


Ah ok - I thought you already had a method for detecting the font resize.
You could always use the text resize detector from ALA :
http://www.alistapart.com/articles/fontresizing/



On 1/15/07, Guillaume <javascript at webdesignofficina.com> wrote:
>
>  No you are not, but I still need to check an element dimension ( height )
> in the layout to see if the user has changed his font size...
>
> Am I missing something or could you not just use onresize??
>
> Like:
> window.onresize=function() { /* do stuff */ }
>
> http://www.w3schools.com/htmldom/event_onresize.asp
>
>
>
> On 1/15/07, Guillaume <javascript at webdesignofficina.com> wrote:
> >
> > Stefan, Paul, and all others who haven't replied yet...
> >
> > Here's my function below re-aranged according to your replies...
> > I still don't understand why, when checkOptSli() is called, I always get
> > the else statement... Not being able
> > to compare an initial value to a listened one...
> >
> > Can someone please light up the path a bit...
> >
> > Regards,
> >
> > Guillaume.
> >
> >
> > function checkOptSli() { // This is fired when a user clicks a link
> >
> >   var sto2 = 0;
> >
> > sto2ID = setTimeout("checkOptJ();", 2000);
> >
> > }
> >
> > function checkOptJ() {
> >
> >     var optsh0 = checkOptK;
> >
> >     optsh3 = optsh0;// Initial value (offsetHeight) of element
> >
> >     var optsh1 = 0;
> >
> >     var optsh1ID = setTimeout("checkOptL();", 2000);
> >
> >     optsh4 = optsh1ID;// Value to be listened to and compared to the
> > previous one above
> >
> >           if ( optsh4 > optsh3 ) {
> >
> >
> >
> >               alert( "things have moved" );
> >
> >             }
> >
> >
> >
> >           else {
> >
> >
> >
> >           alert( "quiet" );
> >
> >
> >
> >
> >
> >             }
> >
> >
> >
> > }
> >
> >
> >
> >    function checkOptK(){ // Fired on the onload so we have a value as
> > starting point
> >
> >       var opts1 = document.getElementById("options");
> >
> >       moveBy1 = opts1.offsetHeight;
> >
> >       posTn3 = 0 - moveBy1;
> >
> >       parseInt( posTn3 );
> >
> >       return posTn3;
> >
> >       }
> >
> >
> >   function checkOptL(){ // Looped inside a setTimeout to see if this
> > value is changing...
> >                         // And compare it inside the checkOptJ()function
> > to the checkOptK()resulting value
> >
> >       var opts2 = document.getElementById("options");
> >
> >       moveBy2 = opts2.offsetHeight;
> >
> >       posTn4 = 0 - moveBy2;
> >
> >       parseInt( posTn4 );
> >
> >       return posTn4;
> >
> >       }
> >
> > _______________________________________________
> > Javascript mailing list
> > Javascript at LaTech.edu
> > https://lists.LaTech.edu/mailman/listinfo/javascript
> >
>
> ------------------------------
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.eduhttps://lists.LaTech.edu/mailman/listinfo/javascript
>
>
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20070115/75fba9f9/attachment.htm>


More information about the Javascript mailing list