Click here to Skip to main content
13,144,265 members (33,450 online)
Click here to Skip to main content
Articles » Web Development » Ajax » General » Downloads

Stats

34.9K views
35 bookmarked
Posted 22 Sep 2006

Context Sensitive Help using Client Callbacks - AJAX Style

, 25 Sep 2006
This article is all about providing Context Sensitive Help in a web page, asynchronously or AJAX style, using Client Callbacks in .NET 2.0.
ContextSensitiveHelpCode
ContextSensitiveHelp_src
ContextSensitiveHelp
App_Code
App_Themes
ControlsTheme
ContextSensitiveHelp.skin
CSS
Database
SampleDataBase.mdb
IMG
ContextSensitiveHelp.gif
Scripts
UserControls
Xml
Messages.dtd
/* Begin Script to get the Context Sensitive Help asynchronously */
    
    function GetContextSensitiveHelp(field) 
    {        
       CallBackHelp(field,"");
    }
    
    function JavaScriptCallBackHelp(help, context)
    {     
        var helpArray = new Array();
        helpArray = help.split('#');        
        ShowHelp('objHelpControl',helpArray[0],helpArray[1]);
    }     
    
    
/* End Script to get the Context Sensitive Help asynchronously */    
        
/* Begin Script to make the Context Sensitive Help draggable */

        var dragApproved = false

        function DragAndDrop(eventArguments){
        if (dragApproved && event.button == 1){
        
        document.getElementById("objHelpControl_csh_Container").style.left = tempx + event.clientX - offsetx + "px"
        document.getElementById("objHelpControl_csh_Container").style.top = tempy + event.clientY - offsety + "px"
        
        }
       
        }

        function InitializeDrag(eventArguments){
        offsetx = event.clientX
        offsety = event.clientY
        tempx = parseInt(document.getElementById("objHelpControl_csh_Container").style.left)
        tempy = parseInt(document.getElementById("objHelpControl_csh_Container").style.top)
        dragApproved = true
        document.getElementById("objHelpControl_csh_Container").onmousemove = DragAndDrop
        }

        function Close(){
        document.getElementById("objHelpControl_csh_Container").style.display = "none"
        }

        function StopDrag(){
        dragApproved = false;
        document.getElementById("objHelpControl_csh_Container").onmousemove = null;
        document.getElementById("objHelpControl_csh_Container").style.display = "";
        }

/* End Script to make the Context Sensitive Help draggable */

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Mahi2407
Web Developer
India India
No Biography provided

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170915.1 | Last Updated 25 Sep 2006
Article Copyright 2006 by Mahi2407
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid