Return msg from ui_template node

Hi:

I have code in a ui_template node and i want to return the file name, in this case $("#file-name").text(this.files[0].name); to a connected node. How would that be done in the below code:

<html>
<head>
<meta http-equiv="Content-Language" content="en-ca">
</head>
<form action="/upload" enctype="multipart/form-data" method="POST">
    <p>XML File Upload:</p>
    <br>
    <label for="getFile" class="btn">
        CHOOSE XML FILE
    </label>
    <input id="getFile" name="myFile" type="file" style="display:none;">
    <label id="file-name"></label>
    <br><br>
    <input type="submit" button class="btn" value="UPLOAD XML FILE"/>
</form>
<script type="text/javascript">
$("#getFile").change(function(){
    $("#file-name").text(this.files[0].name);
});
</script>
</html>

Thanks in advance.

Please read this post in sharing code on the forum and then edit your post to fix up the formatting. The XML is being treated as HTML and not displaying.

Thanks, I updated my previous post.

Found it in another object: msg.req.files.myFile[0].originalname;