View Single Post
  #24 (permalink)  
Old May 8th, 2008, 03:28 PM
gok gok is offline
Registered User
 
Join Date: May 2008
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, thats right, original task was: read db records in .htm using .js.
But in this scenario I'm getting runtime error: 'Server' is undefined (for
Server.CreateObject("ADODB.Connection") call inside .js function).

As an option I was hopping to use .asp (reads db nicely):
<SCRIPT LANGUAGE="JavaScript" src="readDb.asp" runat="server"></SCRIPT>
and use .asp variables on .htm page. Evidently .asp is not
a script and there is no way to read .asp into .htm
Could you suggest any workaround to solve this puzzle?
Thanks a lot for your patient!
Gennady
Quote:
quote:Originally posted by joefawcett
 I'm confused too.
Originally you wanted to use JavaScript server-side to connect to a database and use the data to populate a select list.
Now you could just create the options server-side but I thought you wanted to populate the array server-side and populate the options client-side. Is this not right?

--

Joe (Microsoft MVP - XML)
Reply With Quote