Library tutorials & articles
Remote Scripting With JavaScript and ASP
Introduction
This article was contributed by the team at devArticles.com. If you're after free programming eBooks then please click here.
One of the things I like about CarPoint is that when you choose the make of car you're after from one list, all of the models for that make of car automatically appear in a list on the same page without any page refreshing. I was curious as to how NineMSN accomplished this, so I decided to investigate and delve into the world of remote scripting technologies.
Remote scripting is an extremely powerful feature available in both Netscape Navigator (4.x and above) and Internet Explorer (4.x and above). It allows us to use a combination of scripting languages to call server side ASP code from client side pages. Remote scripting treats our ASP pages as objects and allows us to use the object.method syntax to reference the functions contained within them.
In this article we're going to look at how to setup remote scripting on the client and server, as well as two cool examples that I've come up with in the last week to put remote scripting to good use.
You should have IIS installed on a Windows 98, NT, 2000 or XP web server as well as SQL Server 2000 and ADO version 2.5 or above installed. You should be familiar with JavaScript and ASP, and a bit of SQL knowledge wouldn't hurt either. By the end of this article you should have enough knowledge to implement your own version of the examples shown in this article.
Related articles
Related discussion
-
Header and Footer in Web page print
by fhajaj (4 replies)
-
Auto fill up webpage using java script
by irfanmaitla (0 replies)
-
Free download javascript ebooks
by jmaneesh (0 replies)
-
Adding date in javascript function
by nattyp (2 replies)
-
Search text in a Word document with javascript
by ill_comms (0 replies)
Related podcasts
-
Java Posse #219 - Roundup 08 - The Versus Episode
Roundup 08 - The Versus Discussion Fully formatted shownotes can always be found at http://javaposse.comAgile vs. Traditional methodologies and Properties vs. Immutability in this recording from the Java Posse Roundup 2008.Also, we have a last minute change to the Roundup 2009 - SDWest announc...
Related jobs
-
Technical Support Engineer EMEA
in Reading (£50K-£50K per annum) -
Solutions Engineer
in Reading (£50K-£60K per annum) -
.net developer
in Rijswijk (€2K-€4K per annum)
Events coming up
-
Dec
6
Developing AJAX Web Applications with Castle Monorail
London, United Kingdom
Monorail is the model-view-controller engine of the Castle Project, bringing many of the best ideas of Ruby on Rails to the .NET world. In this talk, David De Florinier and Gojko Adzic show how Monorail makes it easy to develop .NET based AJAX applications, and how to use the Castle Project to build Web 2.0 applications effectively. Come to this session if you are a .NET web developer. Everyone is welcome!
hi,
i tried this it working in my local server (windows 2000). But when i uploaded these files on the internet server it showing an error message "OBJECT DOES NOT SUPPORT THIS PROPERTY OR METHOD". Do u know why this is happening.
kumar
there are several applet-free alternatives to microsoft's implementation of remote scripting that will work with ASP.NET
cross browser remote scripting client
http://authors.aspalliance.com/thycotic/articles/view.aspx?id=4
sample asp.net application using remote scripting
http://www.thycotic.com/dotnet_remotescripting.html
-brian
I have read this article on Remote scripting with Asp. I am wondering
I have read this article on Remote scripting with Asp. I am wondering
if any support is there with Asp.Net. If there what are the relevant links to practice remote scripting with asp.net. Tx
hi,
I am trying some remote scripts. I am getting the same error "Failed to create the ASP object: url". I tried installing the JVM, but still i am receiving the error. I am pasting my code here for your reference. I will appreciate if you have any suggestions or comments,
The "snake.htm" calls snake.asp file from the server. The snake.asp and snake.htm are in the same folder on the server. I am running the client browser from the server machine.
<HTML>
<HEAD>
<TITLE>Remote Scripting Test</TITLE>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript" src="../ScriptLibrary/RS.HTM"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
RSEnableRemoteScripting("../ScriptLibrary")
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript" for="btnStraight" event="onclick">
snake = RSGetASPObject("snake.asp")
cycle = T1.value;
co = snake.TravelStraight(cycle);
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript" for="btnStop" event="onclick">
snake = RSGetASPObject("snake.asp")
co = snake.STOP();
</SCRIPT>
<form name ="snake_frm">
<p>Enter the No of Cycles <input type="text" name="T1" size="5" tabindex="1"></p>
<p> </p>
<p>
<input type="button" value="STRAIGHT" name="btnStraight">
</p>
<p> <input type="button" value="Right" name="btnRight">
<input type="button" value="CENTER" name="btnCenter">
<input type="button" value="LEFT" name="btnLeft">
</p>
<p>
<input type="button" value="STOP" name="btnStop"></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</form>
<p> </p>
<p> </p>
</body>
</html>
All I want to beable to do is have the Remote scripting return a matrix of the querry I submitted. I tried going through the tutorial on remote scripting step by step and can't get the List People SQL tutorial to work. Does anybody know how I can dynamically look up SQL Queries on the serverside and dynamically change my page on the server side?!
The tutorial just hangs never finds any of the users and locks the browser.
Thanks
Shep
The code is working very fine and saved me from refreshing the page again and agian.
It requires Microsoft VM to run and also though a very common thing which just slips of our mind - use "../folder/_scriptlibrary" in the client file .
This may be one of the reasons that its giving an error "Object doesn't support this property or method"
Hi Anil,
This looks like solution to my problem,
Romote scripting which was working suddenly stopped working don't know the reason. probably the JVM got changed sometime back Thanks alot. I will try changing JVM....to remote scripting...
thanks again
Amit.
Hi All,
I had been struggling
I spent 4-5 hours and then came back the next day and it struck
For you guys who're struggling to get Remote Scripting to work, try this and see if it works for you!
Anil
I got the same error i had to change the path from
<script language="JavaScript">
RSEnableRemoteScripting("/_ScriptLibrary");
</script>
to
<script language="JavaScript">
RSEnableRemoteScripting("_ScriptLibrary");
</script>
and it worked
The article is great but when I run this I get an error saying failed to create object "people.asp"
I am running win2kserver sp3/visual idev 6 sp5
Thanks
Jack
Install SP1 for Win XP.
Due to litigation matters, JVM was not included in the release of XP (with IE6), but is now finally available in SP1.
regards,
KH
hi there,
hey did you able to run "remote scripting with javascript and asp" tutorial successfully ? if so, pl help me in that.
Thanks,
viral shah.
Hello
I had similar errors to those that you mentioned, i noticed that they occured soon after i had installed the sun jvm, after much head scratching and even altering rs.htm it dawned on me that perhaps the new jvm might be the reason and that i might not have any problems if i used microsofts jvm instead, i dont know if this is for sure, but when i disabled the sun jvm i didn't have any more of the problems that i had, which happen to be very similar to you own
I have in c:\inetpub\wwwroot\test\scriptlibray installed all the files for the remote scripting to work( rs.htm,rs.asp,rxproxy.class,etc).
I have in c:\inetpub\wwwroot\test\catalog\config\test.asp which uses the remote scripting by adding this
lines to the code
<body>
....
....
<!-- Incluir para Remote Scripting -->
<script language="JavaScript" src="../../ScriptLibrary/rs.htm"></script>
<script language="JavaScript">RSEnableRemoteScripting("../../ScriptLibrary");</script>
<!---->
</body>
And it stills gives me the same error:"Object doesn't support this property or method" with a line number not matching a line in the code.
What can I do? I have tried to re-install the rs files and it sill didn't work, what else can I do?
amitmathur23, you have to install the "Remote Scripting 1.0b" for resolve it...
I'm getting an error stating
"Object doesn't support this property or method".
When i debeg it, it is found on rs.htm file and on the line where
"this.rsapplet.startRequest(request.id,urlcontext,url,this.REQUESTMODE_COMPLETE);" is mentioned.
Please help.
I have tried to run the samples on your article on RS and none of them work. I get an error when RSGetASPObject is invoked.
The problem is in this method MSRSstartRequest. The msg say Object does not support property or method was not handled. Is there something that I'm missing. I using InterDev 6 on Win2k SP2. Pls Help
you can contact the author at mitchell@devarticles.com (sorry ... that information should be present in his profile)
Hi,
The article is very good. But I have got a small problem. Whom do i Contact for further queries.
Can the author look into the quries or problems if the users like me has some problems.
Please let us know.
Regards,
Sailendra.
email:tirusail@yahoo.com
This thread is for discussions of Remote Scripting With JavaScript and ASP.