Old Proxomitron Forums
November 28, 2014, 04:43:40 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: No activity here! This forum is read-only. Go to http://prxbx.com/forums/index.php.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Nicer Buttons for Tame JS  (Read 751 times)
sidki3003

Sr. Member
****
Posts: 476


View Profile WWW Email
« 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


 
Logged

 
Jor

Sr. Member
****
Posts: 421

10401286 jor otf jor_otf
View Profile WWW Email
« Reply #1 on: July 18, 2002, 11:43:16 AM »

Nice alterations! Taken up into my end.js

 
Logged

 
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!