A question about js run

  1. #1

    how to run the front js after the background code complete

    In Coolite , when i run the background code complete, how to run the front js then,and how to send parameters from background code to front js?
    Last edited by wxmayifei; Nov 18, 2010 at 1:56 AM.
  2. #2
    up...
    how can do it?
  3. #3
    Hi,

    X.Js.Call("myJsMethod", param1, param2);
  4. #4
    thank you for reply
    but please description more detail,i can't understand well...
    sorry.
  5. #5
    Hi,

    Here is an example.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            X.Js.Call("myJsMethod", "Test", "Hello from server!");
        }
    </script>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.Net Example</title>
    
        <script type="text/javascript">
            var myJsMethod = function(title, message) {
                Ext.Msg.alert(title, message);
            }
        </script>
    
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" />
        </form>
    </body>
    </html>
  6. #6
    thank you

    Is that in Ext.Net 1.0RC

    i still use Ext.Net 0.8
  7. #7
    Hi,

    For the future please clarify the toolkit's version in the initial post especially if it defers on the current version (Ext.Net 1.0).

    In 0.8.x it can look something like this:

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            ScriptManager.GetInstance(this).AddScript("myJsMethod('Test', 'Hello from server!')");
        }
    </script>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.Net Example</title>
     
        <script type="text/javascript">
            var myJsMethod = function(title, message) {
                Ext.Msg.alert(title, message);
            }
        </script>
     
    </head>
    <body>
        <form runat="server">
        <ext:ScriptManager runat="server" />
        </form>
    </body>
    </html>
  8. #8
    thank you

    i known.

Similar Threads

  1. Presales question
    By t316 in forum 1.x Help
    Replies: 2
    Last Post: Jul 22, 2011, 3:54 PM
  2. Question
    By sipo in forum Licensing
    Replies: 1
    Last Post: May 03, 2010, 1:20 PM
  3. GridCommand Question
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 02, 2009, 4:48 PM
  4. TextField Question
    By davidhoyt in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 12, 2009, 6:04 PM

Posting Permissions