Sehboo wrote on 13 okt 2005 in microsoft.public.inetserver.asp.general:
I don't know if this will work.
What will work? If you don't show us where you are answering on, how
should we know where you are talking about?
How can I call asp function from
javascript? If that is possible then I can just call database from my
asp function.
No that is impossible, as serverside asp executes first and sends the
result as a html-file tot he client.
=========
I am not versed in SQL server, but with the jet-engine [MS-access]
I would do something like this:
================================================== =====
<%
[open the database]
SQL = "select imgName from imgTable"
mD = CONNECT.Execute(SQL)
response.write "<script type= 'text/javascript'>"
response.write "var clientsideArray() = new Array()"
Do Until mD.Eof
response.write "clientsideArray(i++) = '" & mD("imgName") & "'"
mD.MoveNext
Loop
response.write "</script>"
[close the database]
%>
================================================== ====
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)