Click here to Skip to main content
11,645,033 members (63,572 online)
Click here to Skip to main content
Articles » Web Development » Ajax » General » Downloads
Add your own
alternative version

Context Sensitive Help using Client Callbacks - AJAX Style

, 25 Sep 2006 32.6K 222 35
This article is all about providing Context Sensitive Help in a web page, asynchronously or AJAX style, using Client Callbacks in .NET 2.0.
contextsensitivehelp_src.zip
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...

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150731.1 | Last Updated 25 Sep 2006
Article Copyright 2006 by Mahi2407
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid