Mixing Javascript and VBScript

Results 1 to 2 of 2

Thread: Mixing Javascript and VBScript

  1. #1
    Vipul Desai Guest

    Default Mixing Javascript and VBScript

    I have been working with VBScript for about 6 months and I want to start using Javascript within my ASP applications because Javascript supports both browsers. The question I have is can one use any statements like the following when trying to program for both browsers. <BR> &#060;% <BR> Dim db = Server.CreateObject("ADODB.Connection") <BR> DIm rs = Server.CreateObject("ADODB.Recordset") <BR> Session("Salary") = 0 <BR> %&#062;<BR><BR>The question I have is would the above VBScripts statements work under Netscape browsers? If not, how would I open up my databases such as Oracle or SQL65. I currently use ADO 2.1 for opening up databases, but the problem I have with using VBScript is that I am locked in. <BR><BR>&#062;&#062; Can someone please help me out and perhaps provide a good source of how I can perhaps open up Databases with JavaScript.<BR><BR><BR>Thanks,<BR><BR>Vipul<BR><BR ><BR><BR>

  2. #2
    besharah Guest

    Default RE: Mixing Javascript and VBScript

    According to the code you provided you should not have a problem with any browser when you use VBScript. The &#060;%%&#062; tags you use in your web pages are never interpreted by the browser. The code between them is executed on your server. Code executed by the client, on the other hand should be in JAVAScript because it is better supported. As far as using ADO to connect to the database, as long as you are executing the code on the server, there should be no problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts