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
Родитель 23b3ae99cf
Коммит 01d30ca677
2 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

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

Просмотреть файл

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