JavaScript
  Home arrow JavaScript arrow Page 2 - Active Client Pages at the Server
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

Active Client Pages at the Server
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2009-10-20

    Table of Contents:
  • Active Client Pages at the Server
  • The first thing that happens at the server
  • Using Perl to send a string to the client
  • Obtaining a string from any file in any directory at the server

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Active Client Pages at the Server - The first thing that happens at the server


    (Page 2 of 4 )

    In ACP you can get data (a string) from the server using either an external JavaScript tag in a JavaScript in a web page at the client, or you can use Ajax.

    An example of an external JavaScript tag is:

    <script src="xxx.js"></script>

    This tag can be in the HEAD element or the BODY element of your web page at the client. The name of the file in the above tag is xxx.js. It is a JavaScript file. If the file is in a directory different from that of the web page, then in place of this file in the above statement, you should have a URL that looks something like this:

    http://www.somewebsite.com/subdirectory/xxx.js

    The last part of the URL is the file name. The script is downloaded as the browser on the client loads the web page. This JavaScript file simply contains JavaScript statements. The statements may change the content of the present web page or produce another web page at the client’s browser.

    If you are getting the data from the server and using Ajax at the client, then you should have something like this in your Ajax code:

    xmlHttp.open("GET","http://www.somewebsite.com/cgi-bin/exec.pl",true);

    This statement will call the Perl file named exec.pl at the URL of http://www.somewebsite.com/cgi-bin/exec.pl. The exec.pl file is in the cgi-bin directory and it is executable; that is, as soon as it is called, it will be executed at the server.

    The purpose of this execution is to get a string of data from the server and send to the client. The content of the string can be used to change the content of the current web page or produce a new web page at the client.

    So the first thing that happens at the server is that a JavaScript file is downloaded from it to the client, or a Perl script is executed at the server to send a string to the client; either action depends on what you included in your web page.

    More JavaScript Articles
    More By Chrysanthus Forcha


     

    JAVASCRIPT ARTICLES

    - Using jQuery to Preload Images with CSS and ...
    - Using Client-Side Scripting to Preload Image...
    - Removing Non-Semantic Markup when Preloading...
    - Using the Display CSS Property to Preload Im...
    - Preloading Images with CSS and JavaScript
    - Scaling and Moving Web Page Elements with th...
    - Fading, Hiding and Sliding HTML Elements wit...
    - Toggling CSS Properties with the GX JavaScri...
    - Cancel, Queue and Pause Animations with the ...
    - Producing Elastic Effects with the GX JavaSc...
    - Moving Divs Diagonally with the GX JavaScrip...
    - Moving Elements Vertically and Horizontally ...
    - Making Bouncing Effects in Parallel with the...
    - Creating Bouncing Effects with the GX JavaSc...
    - Manipulating Background Colors with the GX J...







    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 7 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek