posted 9 years ago
Hi All,
I am new to Javascripting/HTML. My HTML page looks like
<html>
<head>
.....
......
<script>
Some function named rpcCallMuleEcho(){
}
// Display response message data. Please dont worry on how this function is getting called. I have the logic insiderpcCallMuleEcho(). The function rpcEchoResponse will assign a value like C:\Users\SHARMA\MuleStudio\workspace\Test\songs\Translated\File1.txt_05_19_2014_1.04.42.AM to "response"
function rpcEchoResponse(message) {
document.getElementById("response").innerHTML = message.data;
}
</script>
</head>
<body>
<select id="inputFileSelect">
<option value="C:\\Users\\SHARMA\\MuleStudio\\workspace\\Test\\songs\\Input\\File1.txt">File1.txt</option>
<option value="C:\\Users\\SHARMA\\MuleStudio\\workspace\\Test\\songs\\Input\\hello.docx">hello.docx</option>
</select>
<input id="sendButton" class="button" type="submit" name="Go" value="Send" onclick="rpcCallMuleEcho();"/>
<br/>
<br/>
<br/>
<br/>
<legend><b> Output File Links</b></legend>
<label>Original File</label>
<pre id="inputFileSelect"></pre>
<label>Translated File</label>
<pre id="response"></pre> //prints response C:\Users\SHARMA\MuleStudio\workspace\Test\songs\Translated\File1.txt_05_19_2014_1.04.42.AM
</body>
I want to display response like a link on the click of which we should be able to download the file(C:\Users\SHARMA\MuleStudio\workspace\Test\songs\Translated\File1.txt_05_19_2014_1.04.42.AM). IS it possible in anyway?
Thanks in advance,
Rachael