fix bug 58408 Trailing whitespace not stripped from filename being printed to

fix by bzbarsky@mit.edu r=mao,timeless sr=alecf
This commit is contained in:
timeless%mac.com 2001-02-21 05:19:59 +00:00
parent 23b3ae99cf
commit 01d30ca677
2 changed files with 9 additions and 1 deletions

View File

@ -99,6 +99,14 @@ function checkValid(elementID)
}
}
//---------------------------------------------------
function stripTrailingWhitespace(element)
{
var stringIn = element.value;
stringIn = stringIn.replace(/\s+$/,"");
element.value = stringIn;
}
//---------------------------------------------------
function doPrintToFile( value )
{

View File

@ -60,7 +60,7 @@ Contributor(s): Masaki Katakai <katakai@japan.sun.com>
<row valign="baseline">
<text id="fileLabel" class="label" value="&fileInput.label;"/>
<box>
<textfield id="fileInput" flex ="1"/>
<textfield id="fileInput" flex ="1" onblur="stripTrailingWhitespace(this)"/>
<button id="chooseFile" value = "&chooseButton.label;" oncommand = "onChooseFile()"/>
</box>
</row>