Solved

ASP Object Creation

Posted on 2000-03-10
5
243 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

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 demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now