I am struggling with incorporating the output of a JavaScript function into an ASP page.
function getListOfUidMeter(){
input = "";
var tbl = document.getElementById('tableStripy'), i;
for (i = 0; i < tbl.rows.length; i++) {
input = input + tbl.rows[i].cells[11].outerText).split(",")[0] + ",";
}
return input;
}
The mentioned function returns a string, but I need to access this result within an ASP page and utilize it.
<form name="Form1" method="post" onkeypress="if (event.keyCode==13) {this.submit();event.returnValue=false;} else event.returnValue=true;">
<input class="lookup" type=hidden name="Id" value="<%=PageParams1.Id%>">
<!-- Other hidden input fields are listed here -->
</tr><tr>
<td>
<!--Additional hidden fields-->
<input type="hidden" name = "OLD_STATUS" value = "<%=oldstatus_str%>">
<input type="hidden" name = "X_LSUSER" value = "<%=username_web.toUpperCase()%>">
<input type="hidden" name = "X_LSTIME" value = "<%=data_modifica%>">
</td>
</tr>
</td>
</tr>
</table><!-- /SnapIn -->
<SCRIPT language="javascript">
getListOfUidMeter(); // Calling the JavaScript function to get the desired result
</SCRIPT>
</form>
</body></html>
<% }
catch (e) {ReportError(e); } %>
The challenge lies in effectively transferring the outcome of the mentioned JavaScript function to be used within the ASP context.