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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remote Scripting Errors

Status
Not open for further replies.

AgentM

MIS
Jun 6, 2001
387
US
I am getting the following msgbox when I use remote Scripting.
Remote Scripting Error:
Page invoked does not support remote Scripting.
Does anybody know what it means?
Any help highly appreciated

Here's the code for both the pages:
Client page:
<HTML>
<BODY>
<SCRIPT language=&quot;JavaScript&quot; src=&quot;../_ScriptLibrary/rs.htm&quot;></SCRIPT>
<SCRIPT language=&quot;JavaScript&quot;>RSEnableRemoteScripting(&quot;../_ScriptLibrary&quot;);</SCRIPT>
<SCRIPT language=&quot;JavaScript&quot;>
function CalSelDetails()
{
var Sid = document.myform.txtSid.value;
var serverUrl = &quot;GetSel.asp&quot;;

var RSObj = RSExecute(serverUrl, &quot;Conndb&quot;, Sid);
document.myform.txtSname.value = RSObj.return_value;
}

</SCRIPT>
<FORM name=&quot;myform&quot;>

Id: <INPUT size=&quot;20&quot; type=&quot;text&quot; id= &quot;txtSid&quot; name=&quot;txtSid&quot; onchange=&quot;CalSelDetails()&quot;> <BR>
name:
<INPUT size=&quot;20&quot; type=&quot;text&quot; id=&quot;txtSname&quot; name=&quot;txtSname&quot; ><BR>
Department:
<INPUT size=&quot;20&quot; type=&quot;text&quot; name=&quot;txtSdept&quot;>

</FORM>
</BODY>
</HTML>


Server page:
<!--#INCLUDE FILE=&quot;../_ScriptLibrary/rs.asp&quot;-->

<SCRIPT RUNAT=SERVER Language=javascript>
function Description()
{
this.Conndb = Conndb;

}
public_description = new Description();


function Conndb(strSid)

{
var strSid2;
var strSname;
strSid2 = strSid;
If (strSid2 == &quot;1&quot;)
{
strSname = &quot;Me&quot;;
}
else{
strSname = &quot;Other&quot;;
}

return strSname;
}


</SCRIPT>
 
Can somebody Please, tell me what is wrong with the above code.

 
I am trying to use the onchange function for the txtSid text box.
When the user changes a value inthe text box he should get the appropriate value in the other text box without reloading the page.

The aim of this exercise is to see how Remote Scripting works. Once I get this basic thing working I can expand on it.
Hope this helps.
Thanks for the reply.
 
I see...
But i'm trying to see myself how it's work. If u need quick response i dont know what error is but see if u dont miss something and try to use phisical path to the script...
If u can wait i could see how it's work and i will tell u...
________

George
 
It's hard to make it work at me DSouza, and right now i'm working at another project... ________

George
 
Here is some code to help u

Be shure u put this code at the beginning of the your asp page

<%@ LANGUAGE=VBSCRIPT %>
<!--#include file=&quot;_ScriptLibrary/rs.asp&quot;-->
<% RSDispatch %>

Here what i find out, it took me long time to see what this is about...

Server page:

<%@ LANGUAGE=VBSCRIPT %>
<!--#include file=&quot;_ScriptLibrary/rs.asp&quot;-->
<% RSDispatch %>
<SCRIPT RUNAT=SERVER Language=javascript>
function Description()
{
this.Conndb = Conndb;

}
public_description = new Description();


function Conndb(strSid)

{
var strSid2;
var strSname;
strSid2 = strSid;
If (strSid2 == &quot;1&quot;)
{
strSname = &quot;Me&quot;;
}
else{
strSname = &quot;Other&quot;;
}

return strSname;
}


Client page:
<HTML>
<BODY>
<SCRIPT language=&quot;JavaScript&quot; src=&quot;_ScriptLibrary/rs.htm&quot;></SCRIPT>
<SCRIPT language=&quot;JavaScript&quot;>
RSEnableRemoteScripting()

function CalSelDetails()
{
var Sid = document.myform.txtSid.value;
var serverUrl = &quot;GetSel.asp&quot;;

var RSObj = RSExecute(serverUrl, &quot;Conndb&quot;, Sid);
document.myform.txtSname.value = RSObj.return_value;
}

</SCRIPT>
<FORM name=&quot;myform&quot;>

Id: <INPUT size=&quot;20&quot; type=&quot;text&quot; id= &quot;txtSid&quot; name=&quot;txtSid&quot; onchange=&quot;CalSelDetails()&quot;> <BR>
name:
<INPUT size=&quot;20&quot; type=&quot;text&quot; id=&quot;txtSname&quot; name=&quot;txtSname&quot; ><BR>
Department:
<INPUT size=&quot;20&quot; type=&quot;text&quot; name=&quot;txtSdept&quot;>

</FORM>
</BODY>
</HTML>

if there is anny error please tell me ________

George
 
Thank you very much,
I tried the code, It doesn't give any errors but I don't get the desired result.

There is no value returned from the function.
Any ideas why???
 
u had the _ScriptingLibrary dir in your web?
________
George, M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top