Solved

ASP Object Creation

Posted on 2000-03-10
5
245 Views
Last Modified: 2008-03-10
Hi,
I receive the following error:
---------------------------------
Server object error 'ASP 0177 : 80004001'

Server.CreateObject Failed

/bruce/wp/js.asp, line 13

Not implemented
---------------------------------

This occurs for the following code written in Javascript:
---------------------------------------
<%@ LANGUAGE="JavaScript" %>
<HTML>
<HEAD>
<TITLE>WP Javascript Test</TITLE>
</HEAD>
<BODY>

<%
test();

function test()
{
var wp = Server.CreateObject("WordPerfect.PerfectScript");

wp.Quit();
wp = "";
}
%>
<br>
hello
</BODY>
</HTML>
---------------------------------------

However, it seems to work through VBScript:
---------------------------------------
<%@ LANGUAGE="VBSCRIPT" %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE>WP VB Test</TITLE>
</HEAD>
<BODY>

<%
test

Private Sub test()
      Dim WP

      Set WP = CreateObject("WordPerfect.PerfectScript")

      WP.Quit    

      Set WP=Nothing    
End Sub
%>
hello
</BODY>
</HTML>
---------------------------------------

cheers
Bruce
0
Comment
Question by:bsandeman
5 Comments
 
LVL 7

Expert Comment

by:RBertora
ID: 2604220
Your second option is not VB script it is ASP code, you can only create the
server object in ASP. not vb or java script. (see your second example is inbetween
<% and %> this is all asp code.
Rob;-)
0
 
LVL 4

Accepted Solution

by:
jkunal earned 100 total points
ID: 2604228
In java script you have to use
GetObject function or

var wp= new ActiveXObject("WordPerfect.PerfectScript")

0
 
LVL 1

Author Comment

by:bsandeman
ID: 2604273
RBertora -> Both are ASP one written in VBScript and one written in Javascript.
ASP is not a language as such but a technology.
jkunal -> Thanks a lot for your quick answer.  I did not find that documented anywhere.
cheers
Bruce
0
 
LVL 4

Expert Comment

by:jkunal
ID: 2604367
plsr

;->
0
 
LVL 15

Expert Comment

by:robbert
ID: 2604502
Usually, Server.CreateObject works for JavaScript, too (check with other class strings).

There are always incompatibilites when getting different languages together. VBScript seems to be more tolerant than JavaScript (in MS's implementation).

BTW, in JavaScript, I'ld null;
wp = null
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

809 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