Old Proxomitron Forums

Proxomitron Filters - Discussions welcome => Other => Topic started by: sidki3003 on July 05, 2002, 04:07:00 PM

Title: Nicer Buttons for Tame JS
Post by: sidki3003 on July 05, 2002, 04:07:00 PM
Hi all,

Yesterday i heard about the button tag for the first time.
So this is for nicer and smaller onload/onunload buttons in Paul Rupe's Tame end.js.

Replace
------------------------
    document.writeln('<tr><td><input type=button value=' + fpropn +
                     ' onclick="' + fpropn + 'PROX();"></td>');
------------------------
by
------------------------
//    document.writeln('<tr><td><input type=button value=' + fpropn +
//                     ' onclick="' + fpropn + 'PROX();"></td>');
    document.writeln('<tr><td><button style="background-color: red; height: 18px;" onclick="' +
                     fpropn + 'PROX();"><font style="font-family: Tahoma, Verdana, Arial, serif;' +
                     ' color: gold; font-size: xx-small; font-weight: bold;">' +
                     propn + '</font></button></td>');
------------------------

And this for limiting the output string beneath the buttons to 50 chars.

Replace
------------------------
    document.writeln('<td>' + t + '</td></tr>');
------------------------
by
------------------------
//    document.writeln('<td>' + t + '</td></tr>');
    var u = '';
    for (i = 0; i < 50; i++)
    {
      u += t.charAt(i);
    }
    document.writeln('<td><font size=1 color=gray>' + u + '</font></td></tr>');
------------------------


Note: If you copy and paste the whole code you will have to restore the line breaks. Maybe copying each line is easier.

regards, sidki


 
Title: Nicer Buttons for Tame JS
Post by: Jor on July 18, 2002, 11:43:16 AM
Nice alterations! Taken up into my end.js