[FIXED] [#326] [2.x] IE8 Button href functionality broken

Page 1 of 2 12 LastLast
  1. #1

    [FIXED] [#326] [2.x] IE8 Button href functionality broken

    Hi, please try this code in IE8 or IE10 with IE 8 mode, href is not working anymore.
    We got a customer call today, so it seems to be a bug in a newer version.
    Is there any workaround available? Its urgent

    Thanks
    <%@ Page Language="VB" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html>
    
    <html>
    <head id="Head1" runat="server">
        <title></title>
    
        <script runat="server">
             
            Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
                PanelHeader.Items.Add(getExtToolBar())
            End Sub
            
            Public Function getExtToolbar() As Ext.Net.Toolbar
                Dim menuToolBar As New Ext.Net.Toolbar()
                menuToolBar.ID = "MenuToolBar"
                
                Dim y As New Ext.Net.Button()
                y.ID = "ID 0"
                y.Text = "google"
                y.AutoPostBack = False
                y.Href = "http://www.google.com"
                y.HrefTarget = "_self"
                menuToolBar.Add(y)
                
                Dim x As New Ext.Net.Button()
                x.ID = "ID 1"
                x.Text = "Ext.Net"
                x.AutoPostBack = False
                x.Href = "http://www.ext.net"
                x.HrefTarget = "_self"
                menuToolBar.Add(x)
                
                Return menuToolBar
            End Function
        </script>
    
        <style>
    
        </style>
    </head>
    <body>
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
    
        <ext:Viewport ID="Viewport1" runat="server" Layout="borderLayout">
            <Items>
                            <ext:Panel ID="PanelHeader" runat="server" Region="North" Split="false" Height="64"
                    Collapsible="false" Padding="0" Margins="0" Border="false" >
                    <Items>
    
                                        <ext:Panel ID="Panel12" runat="server">
                                            <Content>
                                                <div id="Header" class="main-title" style="height: 32px;">
                                                    Test</div>
    
                                            </Content>
                                        </ext:Panel>
                                    
    
                    </Items>
                </ext:Panel>
                <ext:Panel ID="Panel1" runat="server" Region="North" Layout="FitLayout" >
                    <Items>
                                                       
                    
                    </Items>
                </ext:Panel>
    
    
    
            </Items>
        </ext:Viewport>
    </body>
    </html>
    Last edited by Daniil; Aug 19, 2013 at 5:38 PM. Reason: [OPEN] [#326]
  2. #2
    Hi @blueworld,

    I've found an open Sencha bug ticket.
    http://www.sencha.com/forum/showthread.php?266596

    We will try to come up with a workaround.
  3. #3
    At this moment we can suggest to use Handler instead Href
    Handler="window.location = 'http://google.com';"
  4. #4
    Somehow I cant get this working, or I am concatenating the string in a wrong way.
    Please note that kvp.value already is a string.

                x.Href = kvp.Value
                x.Handler = "window-location = " + kvp.Value
    in debugger it looks like this:

    handler:function(){window-location = /abc/test.aspx},
    href:"/abc/test.aspx"
    Please note that the quotation marks are missing in the window-location url, which is obviously the problem here



    Btw. href in MenuItem is still working fine in IE8
    Last edited by blueworld; Aug 19, 2013 at 3:44 PM.
  5. #5
    Please use this
    x.Handler = "window.location = '" + kvp.Value + "';"
  6. #6
    Thank you Vladimir, its working now.
  7. #7
    Created an Issue to track the defect.
    https://github.com/extnet/Ext.NET/issues/326
  8. #8
    Sorry to disturb you guys again.

    Yesterday I've been sure that it was working after I've restarted the development server several times. Bofore that I always just got a "Syntax error" in IE8 and IE10 and none of my pages did load.

    Today there is this silly error again, the debugger always points out the row with handler=.....

    handler:function(){window-location = '/abc/showPage.aspx';},
    href:"/abc/showPage.aspx",hrefTarget:"_self",text:"Page"}
                Dim x As New Ext.Net.Button()
                x.ID = kvp.Key + "ID"
                x.Text = kvp.Key
                x.AutoPostBack = False
                x.Href = kvp.Value
                x.Handler = "window-location = '" + kvp.Value + "';"
                x.HrefTarget = "_self"
                menuToolBar.Add(x)
    Might there be a problem witrh the single qoutes in handler?
  9. #9
    Seems you didn't update to:
    Quote Originally Posted by Vladimir View Post
    Please use this
    x.Handler = "window.location = '" + kvp.Value + "';"
    I see:
    x.Handler = "window-location = '" + kvp.Value + "';"
    So, please replace "-" with "."
  10. #10
    Oh.....

    It seems I got it right by accident yesterday :)

    Thank you
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 1
    Last Post: Nov 28, 2012, 2:46 AM
  2. [FIXED] Example/Demo site broken?
    By koss in forum Bugs
    Replies: 2
    Last Post: Jun 24, 2011, 5:08 PM
  3. [FIXED] [V0.7] ViewState Broken
    By Timothy in forum Bugs
    Replies: 1
    Last Post: Nov 17, 2008, 9:40 AM
  4. Replies: 6
    Last Post: Aug 25, 2008, 4:25 PM
  5. Replies: 4
    Last Post: Jul 05, 2008, 2:14 AM

Posting Permissions