Click here to Skip to main content
15,894,362 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: How to read the body of methods in JavaScript Pin
Karthik. A4-Oct-10 10:18
Karthik. A4-Oct-10 10:18 
AnswerRe: How to read the body of methods in JavaScript Pin
moocr.com1-Nov-10 15:58
moocr.com1-Nov-10 15:58 
QuestionCalling jar file from javascript at client side Pin
sakthii3-Oct-10 4:20
sakthii3-Oct-10 4:20 
AnswerRe: Calling jar file from javascript at client side Pin
moocr.com1-Nov-10 16:01
moocr.com1-Nov-10 16:01 
GeneralRe: Calling jar file from javascript at client side Pin
sakthii25-Nov-10 2:58
sakthii25-Nov-10 2:58 
QuestionJavascript/ASP/SQL Pin
Paul Hayman2-Oct-10 20:59
Paul Hayman2-Oct-10 20:59 
AnswerRe: Javascript/ASP/SQL Pin
NeverHeardOfMe3-Oct-10 4:41
NeverHeardOfMe3-Oct-10 4:41 
GeneralRe: Javascript/ASP/SQL Pin
Paul Hayman3-Oct-10 5:22
Paul Hayman3-Oct-10 5:22 
Thanks so much for your response, I fully intend on moving into the correct decade with .net, but i'm very new to web development and it's a bit of a learning curve even with ASP & Javascript. I will get there...

I have been through the code as you suggested and i'm still having problems, I simply need an asp recordset into a javascript array. Maybe i'm just too tired, but I just can't get it right.

Message: Object expected
Line: 14
Char: 1
Code: 0
URI: http://localhost/floorfurnishings/autocompleteactive1.asp

Line 14:
objRs_cmd.ActiveConnection = MM_floordb_STRING


<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--#include file="Connections/floordb.asp" -->
<%

Dim arrPDFs
Dim javascriptArrayValues
Dim objRs
Dim objRs_cmd
Dim objRs_numRows

Set objRs_cmd = Server.CreateObject ("ADODB.Command")
objRs_cmd.ActiveConnection = MM_floordb_STRING
objRs_cmd.CommandText = "SELECT * FROM dbo.Companies" 
objRs_cmd.Prepared = true

Set objRs = objRs_cmd.Execute
objRs_numRows = 0

Function GetPDFsArray()
If NOT objRs.EOF OR NOT objRs.BOF Then 
GetPDFsArray = objRs.GetRows()
Else 
GetPDFsArray = "" 
End If 
End Function 
'Get array
arrPDFs = GetPDFsArray

If isArray(arrPDFs) Then
for i=0 to uBound(arrPDFs,2)
javascriptArrayValues=javascriptArrayValues & """" & arrPDFs(0,i) & """" & ","
next 'i
javascriptArrayValues=Left(javascriptArrayValues,Len(javascriptArrayValues)-1)
Else
javascriptArrayValues = "Error: No results for array" 
End If 

%>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

<%Response.Write(mySQL)%>
<input type="text" name="pdfDesc" id="pdfDesc" autocomplete="off" /> 
<script> 
customarray = new Array(<%=javascriptArrayValues%>);
actb(document.getElementById("pdfDesc"),customarray);
</script>

</head>

<body>
</body>
</html>

<%
objRs.Close()
Set objRs = Nothing
%>


Thanks again.
GeneralRe: Javascript/ASP/SQL (edit) Pin
NeverHeardOfMe3-Oct-10 5:42
NeverHeardOfMe3-Oct-10 5:42 
GeneralHere's a bit of old code I dug up... Pin
NeverHeardOfMe3-Oct-10 5:59
NeverHeardOfMe3-Oct-10 5:59 
GeneralRe: Here's a bit of old code I dug up... Pin
Paul Hayman3-Oct-10 8:01
Paul Hayman3-Oct-10 8:01 
GeneralRe: Here's a bit of old code I dug up... Pin
NeverHeardOfMe3-Oct-10 10:34
NeverHeardOfMe3-Oct-10 10:34 
Questionfind the mistake Pin
yumss1-Oct-10 1:22
yumss1-Oct-10 1:22 
AnswerRe: find the mistake Pin
Pete O'Hanlon1-Oct-10 1:46
mvePete O'Hanlon1-Oct-10 1:46 
GeneralRe: find the mistake Pin
NeverHeardOfMe1-Oct-10 3:20
NeverHeardOfMe1-Oct-10 3:20 
AnswerRe: find the mistake Pin
Stryder_11-Oct-10 3:25
Stryder_11-Oct-10 3:25 
AnswerRe: find the mistake Pin
W Balboos, GHB6-Oct-10 10:02
W Balboos, GHB6-Oct-10 10:02 
Questionbrowser display problem Pin
annie_bel29-Sep-10 23:32
annie_bel29-Sep-10 23:32 
AnswerRe: browser display problem Pin
Gerben Jongerius30-Sep-10 2:24
Gerben Jongerius30-Sep-10 2:24 
Questionadd new cell by pressing tab button Pin
annie_bel29-Sep-10 0:20
annie_bel29-Sep-10 0:20 
AnswerRe: add new cell by pressing tab button Pin
Pete O'Hanlon29-Sep-10 1:10
mvePete O'Hanlon29-Sep-10 1:10 
GeneralRe: add new cell by pressing tab button Pin
annie_bel29-Sep-10 1:30
annie_bel29-Sep-10 1:30 
Questionwindow.status Pin
hotthoughtguy28-Sep-10 6:31
hotthoughtguy28-Sep-10 6:31 
AnswerRe: window.status Pin
hotthoughtguy28-Sep-10 6:32
hotthoughtguy28-Sep-10 6:32 
AnswerRe: window.status Pin
Dr.Walt Fair, PE28-Sep-10 9:36
professionalDr.Walt Fair, PE28-Sep-10 9:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.