noki137
inherit
-3753180
0
May 2, 2024 6:31:11 GMT -8
noki137
0
January 1970
GUEST
|
Post by noki137 on Oct 17, 2009 16:28:58 GMT -8
Board URL: manyears-ago.proboards.com/index.cgi
Problem: I have seen it a few times, where the 'code:' box scrolls.
[color=red]blahfdfjsk fdjkslf dfls kj jdfklsf jk ldsjfdks l jdklsd fjskl kdslfj skldfjdklsfjdklsfj dsl fjksdl fjkls djklf sdkl fklds lkf jklsd kl skl kl fjkld jfklsjdklf sdjklf sdklf jkdls fjkldjfkld sklf sdklf sdklf dkls fklds jfkld slkfjdls sfdkl fkls dfjkls [/color]
Like that up there is stationary, and I could go on forever with that.. gibberish until I stretch my page. Is there a code I can use to make my code boxes scroll?
|
|
#00AF33
14306
0
1
Sept 8, 2023 8:54:17 GMT -8
Jordan
What is truth?
11,838
October 2003
jab2
|
Post by Jordan on Oct 17, 2009 17:11:46 GMT -8
|
|
noki137
inherit
-3753313
0
May 2, 2024 6:31:11 GMT -8
noki137
0
January 1970
GUEST
|
Post by noki137 on Oct 17, 2009 17:42:53 GMT -8
I tried those codes, but they aren't the ones I want really, they still stretch my boards very awkwardly XD I was thinking about something a little more like this;
Unless the ones I tried have the potential to do that, and I am still too new to see that in those codes. But i need something that scrolls vertically, not horizontally
|
|
Former Member
inherit
guest@proboards.com
90203
0
May 2, 2024 6:31:11 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Oct 17, 2009 18:53:26 GMT -8
Here is the code. I did not test it, although it should work correctly.
[noubbc]<script type="text/javascript"> <!-- /* Super Code Tag by california - [OS] You may edit and redistribute, but leave this notice */
var iTable = document.getElementsByTagName("table");
function calcRows(codeContent){ codeContent = "a"+codeContent.replace(/\n/g, '\n a')+"a"; var nRows = codeContent.split(/\n/).length+1; return nRows; }
if(location.href.match(/action=(display|search2|(user)rece|pmview)/)){ for(c=0; c<iTable.length; c++){ if(iTable[c].className == "code"){ var codeContent = iTable[c].rows[0].cells[0].firstChild.innerHTML.replace(/&(amp;)?nbsp;/gi, ' ').replace(/<br\s?\/?>/gi, '\n').replace(/&{1}amp;/gi, '&').replace(/\t/g, ' '); var nRows = calcRows(codeContent); var nCols = (document.body.createTextRange) ? "76" : "72"; iTable[c].rows[0].cells[0].innerHTML = '<textarea onfocus="this.select();" onkeyup="this.rows = calcRows(this.value);" wrap="off" cols="'+nCols+'" rows="'+nRows+'" class="codearea">'+codeContent+'</textarea><textarea style="display: none;">'+codeContent+'</textarea><br /><div style="width: 100%;" align="center"><button onclick="var ppp = this.parentNode.previousSibling.previousSibling.previousSibling; ppp.value = ppp.nextSibling.value; ppp.rows = calcRows(ppp.value); ppp.focus();" align="center">Revert Changes</button></div>'; iTable[c].parentNode.parentNode.parentNode.parentNode.width = ""; } } }
// --> </script>[/noubbc]
|
|
noki137
inherit
-3753482
0
May 2, 2024 6:31:11 GMT -8
noki137
0
January 1970
GUEST
|
Post by noki137 on Oct 17, 2009 19:03:53 GMT -8
Thanks for the codes! But the last one that seems to promising doesn't seem to be working...
I don't know if I am putting it in the right place or not. (I had put it in the global footer)
|
|
inherit
97216
0
Apr 21, 2024 6:56:10 GMT -8
Bennett 🚀
Formerly iPokemon.
3,622
January 2007
catattack
iPokemon's Mini-Profile
|
Post by Bennett 🚀 on Oct 17, 2009 19:05:33 GMT -8
<script type="text/javascript"> <!-- /* Super Code Tag by california - [OS] You may edit and redistribute, but leave this notice */
var iTable = document.getElementsByTagName("table");
function calcRows(codeContent){ codeContent = "a"+codeContent.replace(/\n/g, '\n a')+"a"; var nRows = codeContent.split(/\n/).length+1; return nRows; }
if(location.href.match(/action=(display|search2|(user)rece|pmview)/)){ for(c=0; c<iTable.length; c++){ if(iTable[c].className == "code"){ var codeContent = iTable[c].rows[0].cells[0].firstChild.innerHTML.replace(/&(amp;)?nbsp;/gi, ' ').replace(/<br\s?\/?>/gi, '\n').replace(/&{1}amp;/gi, '&').replace(/\t/g, ' '); var nRows = calcRows(codeContent); var nCols = (document.body.createTextRange) ? "76" : "72"; iTable[c].rows[0].cells[0].innerHTML = '<textarea onfocus="this.select();" onkeyup="this.rows = calcRows(this.value);" wrap="off" cols="'+nCols+'" rows="'+nRows+'" class="codearea">'+codeContent+'</textarea><textarea style="display: none;">'+codeContent+'</textarea><br /><div style="width: 100%;" align="center"><button onclick="var ppp = this.parentNode.previousSibling.previousSibling.previousSibling; ppp.value = ppp.nextSibling.value; ppp.rows = calcRows(ppp.value); ppp.focus();" align="center">Revert Changes</button></div>'; iTable[c].parentNode.parentNode.parentNode.parentNode.width = ""; } } }
// --> </script>
Global Footer
|
|
inherit
106336
0
Aug 20, 2011 8:29:13 GMT -8
ChrisColfer <3
I'm full of enniu.
125
June 2007
thefifthmarauder
|
Post by ChrisColfer <3 on Jun 9, 2010 18:07:05 GMT -8
Hi, I wanted to use this code as well, but is there a way to resize the code box?
|
|
inherit
134992
0
May 26, 2012 2:38:57 GMT -8
SubDevo
Creator of LSD...
3,861
December 2008
subdevo
|
Post by SubDevo on Jun 9, 2010 18:27:13 GMT -8
Hi ChrisColfer. Just put this in your global header.
<style type="text/css"> <!-- .code {width: 500px;} --> </style>
Change the width to whatever you wish.
Regards, SubDevo
EDIT: It appears the OP deleted his PBS account and their forum. hmmm...
|
|
Kami
Forum Cat
Posts: 40,032
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,032
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Jun 9, 2010 18:53:20 GMT -8
Original post: Board URL: manyears-ago.proboards.com/index.cgi
Problem: I have seen it a few times, where the 'code:' box scrolls.
[color=red]blahfdfjsk fdjkslf dfls kj jdfklsf jk ldsjfdks l jdklsd fjskl kdslfj skldfjdklsfjdklsfj dsl fjksdl fjkls djklf sdkl fklds lkf jklsd kl skl kl fjkld jfklsjdklf sdjklf sdklf jkdls fjkldjfkld sklf sdklf sdklf dkls fklds jfkld slkfjdls sfdkl fkls dfjkls [/color]
Like that up there is stationary, and I could go on forever with that.. gibberish until I stretch my page. Is there a code I can use to make my code boxes scroll? The bump: Hi, I wanted to use this code as well, but is there a way to resize the code box? In the future, please don't bump posts this old. =] Create a new thread, link to the post, and ask your question. Thanks!
|
|