Ken,
Thanks for getting back to me. I am trying something similar but its not working. I am trying to query into a Recordset and possibly find the file selected by the user within the recordset and if it doesn't exist then alert the user of it.
- <script>
- function CuteWebUI_AjaxUploader_OnSelect(files) {
-
- <%
- Set AdoCon=Server.CreateObject("ADODB.Connection")
- Set AdoRec=Server.CreateObject("ADODB.Recordset")
- AdoCon.ConnectionString="Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Password=*******;Initial Catalog=AFDDB_DEVY;Data Source=MOMENTUMTEST"
- AdoCon.Open
- AdoRec.Open "Select Custid from APPLICATION",AdoCon
- str=AdoRec.GetString()
- %>
-
-
- for (var i = 0; i < files.length; i++) {
- var name = files[i].FileName;
- if (str=name) {
- alert(name);
- 'files[i].Cancel();
- }
- }
-
-
- <%
- AdoRec.close
- AdoCon.close
- set AdoRec = Nothing
- set AdoCon = Nothing
- %>
-
- </script>
I am just having it show me an alert but its not working. If I do a Response.Write(str) Then it does show me the query response from the database fine.
Do you know the issue here?
Thanks,
Khan