• Blog
  • Resume
  • Projects
  • Music
  • Photos
  • E-mail
  • Projects

    Sep 8th, 2006 by ocvirek.com

    AjaxLE - ajax Lightweight Engine v1.0

    AjaxLE is free, lightweight, very simple and usefull javascript suitable for various kinds of web applications. It is a client side single javascript file and it assumes that you’re familiar with some server-side technology such as ASP.NET, ASP or PHP which will be used to generate content that should be dynamically displayed. If you are looking for ajax framework with XML transformation, visual transition effects, drag’n'drop and similar stuff, then you will not be satisfied with AjaxLE. In that case you should look for more advanced ajax frameworks such as Microsoft Ajax (formerly known as Atlas), Rico, RubyOnRails, depending on your prefering technology. The purpose of AjaxLE is to provider a really basic transport mechanism to acquire and fetch content form web server and than display it on the main page inside targeted DIV element (placeholder). No more, no less. AjaxLE is best described as a set of JavaScript functions for achieving partial page update inside DIV element and executing custom JavaScript code after the round-trip (assuming that code is generated on the server-side and then returned to the client). In context of ASP.NET 2.0 application equipped with Microsoft Ajax framework, AjaxLE is a bit outdated, but neverthless, it could be usefull because of it’s minimalistic nature, speed and it’s reliability (it’s tested in enterprise environment with 1000+ users, providing partial page updates for web forms in an large Classic ASP application). 

    There are two major limitations:
    1. It supports GET method only which means that for sending parameters to the server, you’ll have to include all your parameters inside calling URL - for example: serverSide.php?p1=v1&p2=v2 etc.
    2. It fetches textual data only, not XML. Thant means that you should prepare complete HTML-output code on the server side and then inject it into DIV placeholder on the main webpage.

    Considering relevant limitations, it’s best suited for scenarios when you need fast and easy solution for occasional ajax calls such as populating lists & grids, fetching tables, rollovering pictures etc. (any partial page update). 

    Click here to start download AjaxLE v1.0

    Here are few FAQs on using ajaxLE:

    Q: How to include it in your web page ?
    A: Just include ‘ajaxLE.js’ using script tag

    Q: How can I do something with ajaxLE ?
    A: ajaxLE has only two javascript methods that can be called and executed in runtime. In most cases these functions will be triggered by client side event such as onClick, onBlur, onChange etc.

    Method 1:
    ajaxRender(url, divID, callback);

    this method opens server side page on the given url and then injects rendered HTML content (returned by that particular server side webpage) in DIV element inside the body of your webpage. This is achieved by dynamically changing the value of the .innerHTML propery of given DIV element.

    Parameters:

    url : regular URL path to any server side webpage (.php, .asp, .aspx) inside your domain (note: URL’s outside your domain cannot be used because of javascript’s security limitations)
    example: ajaxcode.asp?p1=value1&p2=value2
    notice: URL must include at least one GET parameter (if you don’t need any parameters, you should include dummy parameters such as dummy=ok). URL’s without these aren’t valid (e.g. “somepage.asp” is wrong, “somepage.asp?x=1″ is valid). If you don’t have any parameteres to provide when calling URL, just put some fake ones (e.g. “somepage.asp?dummy=ok”.)

    divID: ID attribute of targeted DIV element (placeholder) inside the body of your webpage which is going to be used to hold the content fetched with ajax call.

    callback: callback is optional parameter and it represents javascript statement such as alert(’Message’); or var a = 2;. If you need to execute particular javascript function when your ajax request is completed, this parameter should contain valid function call statement such as myFunciton(par1,par2); or void(myFunc(’John Doe’,1990)); Notice: Since ajax works asynchronously, this javascript statement will be executed when ajaxRender method is completed and this is a good approach when you need sequential execution

    Method 2:
    ajaxExecute(url, callBack);

    this method opens server side page on the given url and then executes javascript statements (one or more lines) that are rendered and returned by particular server side webpage. Parameters are same as with ajaxExecute method except paramter divID is missing. Notice: this method uses standard eval(”statement”) method of javascript to execute rendered script.

    Q: Is there any example ?
    A: Yes, it’s included in the .zip file

    Disclaimer & Copyright

    The software is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or otherdealings in the software.

    You are entitled to download it, evaluate it and use it for free at your own risk. Technical support is not provided, however make sure to read all included/related documentation regarding any downloadable file for additional licences and copyrights. Check out www.ocvirek.com regulary for updates and news regarding software products.

    All presented designs, websites, software projects and shareware/commercial utilities including technical information, screenshots and other relevant media, are protected and copyrighted property of their respective owners. Some Information is presented only to demonstrate my skills and various aspects of my work. Commercial value and nature of these projects is not relevant here and therefore it will not be discussed.

    Comments are closed.

    Categories

    • Articles
    • ASP.NET
    • C#
    • Music Production
    • Networking
    • News
    • Open Source
    • Software
    • SQL Server
    • Tips'n'Tricks
    • Tutorials
    • Virtual PC
    • Visual Studio
    • Windows Vista

    Recent Entries

    • Visual Studio 2010 Can’t build web site with RDLC report
    • Turn off grammar and spelling checker in Google Chrome
    • Google Chrome works very slowly on localhost while debugging in Visual Studio
    • Annoying error with app.config file: “An unhandled exception of type ‘System.Configuration.ConfigurationErrorsException’ occurred in System.Configuration.dll - Configuration system failed to initialize”
    • Photos in Windows Photo Gallery are too yellow
    • Synergy - Use single mouse and keyboard between multiple computes using LAN
    • Microsoft Security Essentials - Not available in your country. Here’s the fix.
    • SQL Server 2008 Managment Studio - Cannot enlist databases in the Object Explorer
    • Jamendo among the world’s 100 best websites and I’m on it :)
    • Ephemeris in Jamendo’s TOP 100 this week

    Recent Comments

    • Damir in Synergy - Use single mouse and keyboard between mu…
    • Dan in Total Commander - change location of wincmd.ini an…
    • Nagendran.I in Failed to access IIS metabase error with ASP.NET 2…
    • Neetee in FLAC versions of "Ephemeris" and "Fortadelis" avai…
    • Josip Šaban in Failed to enable constraints. One or more rows con…
    • mikey in Calendar Extender shows up messy when used in an U…
    • ocvirek.com in Launching fortadeliss.com
    • ocvirek.com in Launching fortadeliss.com

    Rss

    • Main Entries RSS
    • Comments RSS

    Links

    • Business

      • IN2 d.o.o.
      • PcChip Magazine
    • Contact

      • E-mail: ocvirek@gmail.com
      • ICQ
      • LinkedIn
      • Photo Gallery
    • Friends

      • bembelembe.com
      • Damir Korbar SQL Server Guru
      • Marko's Developers Corner
      • podukagitrare.com
      • svemirvranko.com
      • uremovic.biz
    • Projects

      • arka.hr
      • auto-vidicek.hr
      • biobio.com.hr
      • Civitas Elan Zagreb
      • healthycitieszagreb2008.com
      • hzzweb.hzz.hr
      • lavandamia.hr
      • lbc-group.com
      • makronova.com
      • Meridijani magazine CD-ROM release
      • pses-inova.hr
      • pug.hr
      • Stock84Club
      • Stock84Distribution
      • udruga-prsten.hr

    Archives

    • June 2010
    • April 2010
    • November 2009
    • October 2009
    • May 2009
    • April 2009
    • December 2008
    • November 2008
    • June 2008
    • May 2008
    • February 2008
    • January 2008
    • December 2007
    • November 2007
    • October 2007
    • September 2007
    • August 2007
    • July 2007
    • April 2007
    • March 2007
    • January 2007
    • December 2006
    • November 2006
    • October 2006
    • September 2006
    • August 2006
    • July 2006

    Meta

    • Login
    • Valid XHTML
    • WordPress
    ocvirek.com | solving IT challenges © 2010 All Rights Reserved. Mind Break by Its Nature

    Home Interiors - Plumbing Supplies - Indoor Lighting - Cyprus Hotels
    Back to Top