Ext.Fly problem in 2.x version

  1. #1

    Ext.Fly problem in 2.x version

    HI, in version 1.x this code run well but not work in version 2.x.
    Please help me to make it work

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestFly.aspx.cs" Inherits="TestExtProject.TestFly" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!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>Test Fly</title>
        <script type="text/javascript">
            var count = 0;
            var button_click = function () {
                count++;
                document.getElementById('labelTest').innerHTML = "Hello World" + " " + count;
                Ext.fly(document.getElementById('labelTest')).highlight("236CB1", {
                    attr: "background-color",
                    duration: 3
                });
            }
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <div style="height: 20px;">
            <ext:Label ID="labelTest" runat="server" Text="Hello World" />
        </div>
        <ext:Button ID="Button1" runat="server" Text="Test">
            <Listeners>
                <Click Handler="button_click()">
                </Click>
            </Listeners>
        </ext:Button>
        </form>
    </body>
    </html>
  2. #2
    Maybe remove the call to document.getElementById inside Ext.fly(). It's not required.
    Geoffrey McGill
    Founder
  3. #3
    There were a few things wrong with the sample you provided. I created a simplified .aspx sample demonstrating the whole scenario which you can use to compare against your original.

    Example

    <%@ Page Language="C#" %> 
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    
    <!DOCTYPE html>
    
    
    <html>
    <head runat="server">
        <title>Ext.NET Example</title>
        <script type="text/javascript">
            var count = 0,
                button_click = function () {
                    Ext.fly('Label1').update('Hello World ' + count++).highlight('236CB1');
                };
        </script>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
    
            <div style="height: 20px;">
                <ext:Label ID="Label1" runat="server" Text="Hello World" />
            </div>
        
            <ext:Button runat="server" Text="Test" OnClientClick="button_click()" />
        </form>
    </body>
    </html>
    More information on the .highlight function, see

    http://docs.sencha.com/ext-js/4-1/#!...thod-highlight

    Hope this helps.
    Geoffrey McGill
    Founder
  4. #4
    Quote Originally Posted by geoffrey.mcgill View Post
    There were a few things wrong with the sample you provided. I created a simplified .aspx sample demonstrating the whole scenario which you can use to compare against your original.

    ...
    Thanks geoffrey, it work very well.
  5. #5
    You can mark this thread Closed, many thanks
    Last edited by GolineTidus; Nov 28, 2012 at 3:07 AM.

Similar Threads

  1. [CLOSED] Problem under Opera last version
    By feanor91 in forum 2.x Legacy Premium Help
    Replies: 32
    Last Post: Jul 13, 2012, 1:22 PM
  2. [CLOSED] Problem in last svn version (3977)
    By feanor91 in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: May 02, 2012, 12:24 PM
  3. [CLOSED] Problem when updating to new version
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Oct 08, 2010, 12:17 PM
  4. [CLOSED] Problem getting the Professional version 1.0?
    By flormariafr in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 26, 2010, 10:21 AM
  5. combo edit problem in 0.8 version
    By Dinesh.T in forum 1.x Help
    Replies: 2
    Last Post: Jul 22, 2009, 10:15 AM

Posting Permissions