vForums Support > Programming & Coding :: Code Requests & Support :: > [F] Auto-Scroll Sig Mod

[F] Auto-Scroll Sig Mod - Posted By dog199200 (dog199200) on 10th Apr 08 at 5:30pm
can i possibly get the code modded that anyone with a sig taht is higher then 400 pixels will be put into a scroll as well.

Code:
 
  1. <script type="text/javascript">
  2. <!--
  3. /* Auto-Scroll Sig by Cr0w & Wrighty! =P */
  4.  
  5. var td = get('td','tag');
  6. var w = (vf_width * 0.8) + 'px';
  7.  
  8. for(t=0;t<td.length;t++){
  9.     if(td[t].className == "post signature"){
  10.         var d = document.createElement('div');
  11.         d.style.cssText = "width: "+w+"; overflow-x: auto;";
  12.         d.appendChild(td[t].firstChild.nextSibling);
  13.         td[t].appendChild(d);
  14.     }
  15. }
  16. //-->
  17. </script>
 


i tried to do it myself but it doesn't seem that this works:

Code:
 
  1. <script type="text/javascript">
  2. <!--
  3. /* Auto-Scroll Sig by Cr0w & Wrighty! =P */
  4.  
  5. var td = get('td','tag');
  6. var w = (vf_width * 0.8) + 'px';
  7. var h = (vf_height * 0.4) + 'px';
  8.  
  9. for(t=0;t<td.length;t++){
  10.     if(td[t].className == "post signature"){
  11.         var d = document.createElement('div');
  12.         d.style.cssText = "width: "+w+"; overflow-x: auto;";
  13.         d.style.cssText = "height: "+h+"; overflow-x: auto;";
  14.         d.appendChild(td[t].firstChild.nextSibling);
  15.         td[t].appendChild(d);
  16.     }
  17. }
  18. //-->
  19. </script>
 

Re: Auto-Scroll Sig Mod - Posted By Michael (wrighty) on 10th Apr 08 at 5:36pm
try:
Code:
 
  1. <script type="text/javascript">
  2. <!--
  3. /* Auto-Scroll Sig by Cr0w & Wrighty! =P */
  4.  
  5. var td = get('td','tag');
  6. var w = (vf_width * 0.8) + 'px';
  7.  
  8. for(t=0;t<td.length;t++){
  9.     if(td[t].className == "post signature"){
  10.         var d = document.createElement('div');
  11.         d.style.cssText = "width: "+w+"; overflow-x: auto; height: 400px; overflow-y: auto;";
  12.         d.appendChild(td[t].firstChild.nextSibling);
  13.         td[t].appendChild(d);
  14.     }
  15. }
  16. //-->
  17. </script>
 

Re: Auto-Scroll Sig Mod - Posted By dog199200 (dog199200) on 10th Apr 08 at 5:38pm
...ty, but darn i was no where near close...


Edit: ok that doesn't work, it just extents the sig to 400 pixels

Re: Auto-Scroll Sig Mod - Posted By Michael (wrighty) on 10th Apr 08 at 5:43pm
And if the sig was over 400 px it would expand to that! {Unsure}

I feel that this is a code that I'll have to play with! {Unsure}

I have family here at the moment, they'll be gone within 2 hours (I hope) so I'll jump on you it then! ^_^

Re: Auto-Scroll Sig Mod - Posted By dog199200 (dog199200) on 10th Apr 08 at 5:45pm
lol, i got it you where right i had to play with it, to get it to work for 400px like i wnated i had to set it to 300px

Re: Auto-Scroll Sig Mod - Posted By Michael (wrighty) on 10th Apr 08 at 5:50pm
So it's ok? {Unsure}

Re: Auto-Scroll Sig Mod - Posted By dog199200 (dog199200) on 10th Apr 08 at 6:31pm
ya it works ty

Re: Auto-Scroll Sig Mod - Posted By Michael (wrighty) on 10th Apr 08 at 6:32pm
Welcome! {Grin}