Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remote Scripting Problem

Status
Not open for further replies.

phzero

Programmer
Feb 14, 2002
86
ZA
Hi All, can anybody tell me what it is I'm doing wrong. I've tried everything (to my knowledge) and even this implest example does not work. Can anybody spot the not:

<HTML>
<HEAD>
<TITLE>SIMPLE CLIENT</TITLE>
</HEAD>

<BODY>
<script language=&quot;JavaScript&quot; src=&quot;../_ScriptLibrary/rs.htm&quot;></script>
<script language=&quot;JavaScript&quot;>RSEnableRemoteScripting(&quot;../_ScriptLIbrary&quot;);</script>

<h2>Simple Remote Scripting Example</h2>

<br>
The following buttons invoke remote scripting calls to an ASP server.
<br>
<form>
<br><br><input type=&quot;button&quot; name=&quot;tester&quot; value=&quot;Click Me&quot; onclick=&quot;CallFunc()&quot;>

<SCRIPT LANGUAGE=&quot;VBScript&quot;>

dim rsPage, ServerPage, aspObject, MyValue
ServerPage = &quot;simple.asp&quot;

function CallFunc
alert(&quot;Client Function Started&quot;)

'set rsPage = RSGetASPObject(ServerPage)
'MyValue = rsPage.tester()

set aspObject = RSExecute(Serverpage, &quot;tester&quot;)
MyValue = aspObject.return_value

alert(MyValue)
end function

</SCRIPT>

</form>
</BODY>
</HTML>

<%@ Language=JavaScript %>
<% RSDispatch %>

#INCLUDE FILE=&quot;../_ScriptLibrary/rs.asp&quot;

<script language=&quot;JavaScript&quot;>

var public_description = new Description();
function Description()
{
this.tester = tester;
}

function tester()
{
return &quot;Server Function Called&quot;
}

</script>

 
An indication of what you're trying to do and what the problem is might be useful! --James
 
My humblest apologies, here goes. I'm trying to implement remote scripting. This version of mine does not call the function in the ASP at all and when I try to call the function GetASPObject I get the following error: &quot;Failed to create ASP object for: &quot;simple.asp&quot;. The second alert in my htm file should read &quot;Server Function Called&quot; but its blank which means the function is not being called.

Am I missing something?
Thanks for any replies.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top