Skip to content
Commits on Source (2)
......@@ -214,7 +214,16 @@ $(function(){
//populate the address box when an address is selected
$("select#addsel").change(function(){
$("textarea#address").val($('select#addsel').val().replace(/, /g,'\n'));
// everything is shit and will strip out the line breaks
// so we have to do weird shit with innerHTML
// store the entire options as e
var e = document.getElementById("addsel");
// store the selected address's innerHTML as strUser (because stackpver flow copy and paste)
var strUser = e.options[e.selectedIndex].innerHTML;
// set the text area to the strUser var
$("textarea#address").text( strUser );
$('div#addressmessage').attr("style","color:green; float:right; clear:right;");
$('div#addressmessage').html("OK");
validation['address']=true;
......