How can I call javascript functions, locate in <head> section, in a query list in ASP tags?
This is an example I need to format dates:
Head page code:
Code:
<head>
<meta http-equiv="Content-Language" content="pt">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title> ...  ...</title>
<script language="JavaScript"><!--
function formataData(d) {
		var strHoje = new Date(d);
		var strDia = strHoje.getDate(); 
			if (strDia < 10){ strDia = "0" + strDia }
		var strMes = strHoje.getMonth(); 
			strMes = strMes + 1;
				if (strMes < 10) { strMes = "0" + strMes }
		var strAno = strHoje.getYear();
		var DataHoje = strDia + "-" + strMes + "-" + strAno; 
	return DataHoje;
}
--></script>
And in the middle of the page I use to try to call that function:
Code:
<% 	
	var rs3 = Server.CreateObject("ADODB.Recordset");
 	strSQL3 = "Select * from Frota_consumo where UO= '" + vXu + "' order by x_matricula ASC, data_consumo DESC";
	rs3.Open (strSQL3, conn); 
	while (!rs3.EOF) { 

	var vD1 = rs3("data_consumo");
	var vData1 = formataData(vD1);
	var vD2 = rs3("data_consumo");
	var vData2 = formataData(vD2);
	
	vFile.WriteLine (rs3("x_matricula") + ";" + vData1 + ";" + vData2 + ";" + rs3("contagem_actual") + ";" + rs3("contagem_consumo") + ";" + rs3("litros_consumo") + ";" + rs3("custo_consumo"));

%>
I need this to be used in a list, with some date values, to export to a external file.
Any Help? Thanks!