[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Scrolling Text using VBScript

Posted on 2002-05-10
14
Medium Priority
?
1,264 Views
Last Modified: 2008-02-01
OK, I'm an experienced VB programmer, but I'm still getting my feet wet coding with ASP/VBScript/JavaScript, so bear with me...

I'm trying to add a scrolling marquee, just like at http://javascript.internet.com/scrolls/multiple-message-scroller.html.  However, I'd like to use VBScript instead of JavaScript.  The main reason is that I'd like to call an ActiveX dll to make some back-end DB calls.  Basically, the call to the dll will retrieve the appropriate message, after checking things like security and stuff.  Now, if I can call that dll using JavaScript to get the information, that'd be great also.

Just to give you how things are arranged, I have an .htm file that is currently using JavaScript that resides in other files.  Can I mix JavaScript and VBScript in the same file?
0
Comment
Question by:kcleary
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
14 Comments
 
LVL 23

Expert Comment

by:b1xml2
ID: 7001571
1. Using an ActiveX Control (ocx which is compiled as a cab file) for the web browser (not ActiveX DLL) will restrict your browser to MSIE4+. ActiveX Controls created via VB can be both slow and bloated in size.

2. There are numerous ways to send data back to a web server that hides the details of the db and for which is the preferred technique for traditional ASP Applications. For ASP.NET, the preferred way is to consume web services in web applications or perform .NET remoting for which a web server and the http protocol is not necessary at all.

3. Yes, you can mix Javascript and VBScript in the same file. Just make sure not to have duplicate variable names. VBScript is case-insensitive whereas Javascript is case sensitive.

After all, this is the ASP Topic Area =)

Cheers.
0
 

Author Comment

by:kcleary
ID: 7001597
There's already an ActiveX DLL in place to handle stored procedure calls to the back-end DB, so I need to use that.  I'm trying to call that DLL from JavaScript, but I'm having problems.  I'm trying the following...

var objProdCustData = new ActiveXObject("dllname.classname")

The DLL resides on the server, so I'm not sure what I need to do.
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 7001637
newObj = new ActiveXObject(servername.typename[, location])

e.g.
var oProdCustData = new ActiveXObject("dllname.classname","myserver"); if you wish to instantiate the dll residing on the server. The dll will be hosted on the client's namespace and not server.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:kcleary
ID: 7001700
OK, I know that command works, but I'm having problems finding the DLL.  It's registered on my PC, and is residing in a folder under Inetpub (on the localhost...using PWS).  I've tried adding a location, but nothing seems to work right.
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 7001756
if you are using PWS, sorry no such luck, You need to develop using IIS in Windows 2000 or Windows NT, workstation or server makes little difference for dev work. Certainly not PWS.
0
 

Author Comment

by:kcleary
ID: 7001855
So why does this work on PWS

var objProdCustData=new ActiveXObject("MsComDlg.CommonDialog");

but this does not

var objProdCustData=new ActiveXObject("ProdCustData_XML.crm");
0
 

Author Comment

by:kcleary
ID: 7001863
Oh, and it is IIS on Windows 2000.
0
 

Author Comment

by:kcleary
ID: 7001869
Oh, and it is IIS on Windows 2000.
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 7001874
as I have pointed out, inside MSIE, you generally host ActiveX Controls if you create them yourself with VB. There are numerous issues at hand. Furthermore, the common dialog is an ActiveX Control comdlg32.ocx
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 7001884
tip, create an activex control. it basically will do that you need. compile it and distribute it as a cab file. Then under InterDev or FrontPage, add that activex control and you can make it visible. This is achieved by using the OBJECT tag which allows for the downloading and installation of the ActiveX Control.

Best Of Luck
0
 
LVL 15

Expert Comment

by:robbert
ID: 7003006
> The main reason is that I'd like to call an ActiveX dll to make some back-end DB calls.

To connect to a remote component via DCOM, you would need to register the component's typelib on the client computer. I guess that's not an option.

Instead, you would use Remote Scripting:
http://msdn.microsoft.com/downloads/default.asp?URL=/downloads/sample.asp?url=/msdn-files/027/001/734/msdncompositedoc.xml

Architecture, concisely:
Client-side Java applet which can be queried by JavaScript, and does remote HTTP requests to the server. At the server, you can call custom functions located in ASP documents.
Works with IE and NN.
0
 
LVL 23

Accepted Solution

by:
b1xml2 earned 800 total points
ID: 7003019
robbert,

either that or use the XMLHTTP Object to pass data to and from the web server. Remote Scripting although is a cross browser implementation suffers from some severe deficiency including the amount of data that can be sent to and from the server. This is probably due to the limitations of the rsproxy.class java applet is invoked on the client.

It might interest you to know that NS 6.2 supports XMLHTTP albeit the syntax is XMLHTTPRequest =).

Since the asker has yet to object to an MSIE all implementation, Remote Scripting can be ditched. The beauty of use the XMLHTTP approach is:

1. Most MSIE5+ have it already installed.
2. You can use scripts to autodetect XML Parser on the client and where there is none, to re-direct to a software download page where an automated download is instantiated.
3. The XMLHTTP Object basically allows for a traditional client-server application for a web application.
4. The 1500 bytes limitation of the remote scripting applet of course can be circumvented by some ugly workaround. The XMLHTTP Object has no such horrible upper limits/
0
 

Author Comment

by:kcleary
ID: 7008912
Thanks for the help b1xml2...I took some of your stuff and incorporated it into some other things I found.
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 7009955
Most welcome, kcleary =)).
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question