I have page index.asp in this file i have Vbscript function:
<%
Dim GetFromVbscript
GetFromVbscript = "hello"
%>
And javascript function
function SendFiltered() {
$.ajax({
url: '/Filtered.asp',
type: 'POST',
data: "<%=GetFromVbscript%>",
dataType: 'text',
success: function (data) {
$(".center").html(data)
}
});
};
It ok. It Post "hello"
.
Now I need to run this javascript from external file so my index.asp now look like
<%
Dim GetFromVbscript
GetFromVbscript = "hello"
%>
<script src="js/SendFiltered.js"></script>
But now it Post "<%=GetFromVbscript%>"
So question is How to pass value or variable from VBscript to javascript?