PDA

View Full Version : calling vbscript from javascript Part2 Attn: Dr. Web


praveeng78
08-24-2002, 11:12 PM
You are right about my plight. If only you could help me some more.
What exactly is the action.asp page. Is it on the server?? My vbscript part looks this way.

<%
sub connect(names)
Dim Conn
set Conn = server.createobject("ADODB.connection")
temp="DRIVER={Microsoft Access Driver (*.mdb)}; "
temp=temp&"DBQ="&server.mappath("./fpdb/Survey.mdb")
Conn.Open temp
Response.Write "DONE "&"****************"
Insert="insert into srilata (name) values ('"&names& "')"
Conn.Execute Insert
Conn.Close
END sub

%>

I have to store the "names" in the database. Names are obtained from a form.

Thanx.

Dr. Web
08-25-2002, 12:26 PM
well, I mean that you should just submit the form to a "action" page.... or a ASP page that does the saving of the file for you. Put your code into a quizAction.asp file because you need the server to do the action of writing to the access db for you. You should really look over some ASP tutorials.... your trying to insert server side VBscript to accomplish something client side.