add SetPixelOrPercentByID()

This commit is contained in:
brade%netscape.com 1999-07-02 14:31:02 +00:00
parent 9e17a12a99
commit e2af06b196

View File

@ -81,6 +81,26 @@ function SetLabelEnabledByID( labelID, doEnable )
}
}
// Input string is "" for pixel, or "%" for percent
function SetPixelOrPercentByID(elementID, percentString)
{
percentChar = percentString;
dump("SetPixelOrPercent. PercentChar="+percentChar+"\n");
btn = document.getElementById( elementID );
if ( btn )
{
if ( percentChar == "%" )
{
btn.setAttribute( "value", "percent" );
}
else
{
btn.setAttribute( "value", "pixels" );
}
}
}
// All dialogs share this simple method
function onCancel()
{