Browser compatibility issue - ajaxToolkit:TabPanel

Last post 03-17-2009 4:22 AM by ianthm. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-16-2009 1:34 AM

    • ianthm
    • Top 10 Contributor
    • Joined on 03-25-2008
    • Wannabe Slacker
    • Points 1,401

    Browser compatibility issue - ajaxToolkit:TabPanel

     

    Hi

    I'm working on an app that uses Virtual Earth maps in a Ajax tab panel…

    I have created a dummy example here:

    http://98.130.80.39/testmap.aspx

    The map displays correctly in Internet Explorer(ie7) but is not displayed in Firefox(ff2, ff3) Chrome or Safari.

    I have used Firebug for firefox to debug, but understanding the errors is beyond me.

    ERROR 1

     

    uncaught exception: [object Object]
    this._upperAbbrMonths = this...s.dateTimeFormat.AbbreviatedMonthNames);
    ERROR 2

    [Exception... "'[object Object]' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]
    Any help or feedback is much appreciated...
    I.T

  •  Advertisement

    Featured Advertisement

     
  • 03-16-2009 12:56 PM In reply to

    • xxxd
    • Top 10 Contributor
    • Joined on 12-18-2006
    • Slacker
    • Points 19,057

    Re: Browser compatibility issue - ajaxToolkit:TabPanel

     this kind of error message is beyond comprehension to anybody.

    Can you post the problematic segment of code

  • 03-17-2009 4:22 AM In reply to

    • ianthm
    • Top 10 Contributor
    • Joined on 03-25-2008
    • Wannabe Slacker
    • Points 1,401

    Re: Browser compatibility issue - ajaxToolkit:TabPanel

    The Source:

    <asp:Content ID="Content3" ContentPlaceHolderID="RightContentPlaceHolder" Runat="Server">
    <ajaxToolkit:TabContainer runat="server" ID="Tabs" OnClientActiveTabChanged="GetMap" ActiveTabIndex="1" CssClass="tab">
       
        <ajaxToolkit:TabPanel runat="Server" ID="TabPanelMap"  HeaderText="Tab Map">
            <ContentTemplate>
                <div id='MyMap' visible="false" style="position:relative; width:798px; height:400px; border:1px solid #7F9DB9;"></div>
            </ContentTemplate>
        </ajaxToolkit:TabPanel>
       
        <ajaxToolkit:TabPanel runat="Server" ID="TabPanel1"  HeaderText="Tab 1">
            <ContentTemplate>
               <h2 style="font-size:1.4em;color:#353535;padding:20px 0;"> The first tab...</h2>
            </ContentTemplate>
        </ajaxToolkit:TabPanel>
       
    </ajaxToolkit:TabContainer>
    </asp:Content>

    The Codebehind:

    public partial class TestMap : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            // local varible for dataset
            int projectID = 172;
            //Get DataSet
            DataSet dsMap = ChainDA.MOCList(projectID);

            // Add JS attribute to body tag... as we're using a master page
            HtmlGenericControl body = (HtmlGenericControl)Master.FindControl("MMCBody");
            body.Attributes.Add("onload", "GetMap();");

            // Add VE link to Head section
            HtmlGenericControl msLink = new HtmlGenericControl("script");
            msLink.Attributes.Add("type", "text/javascript");
            msLink.Attributes.Add("src", "http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2");
            this.Page.Header.Controls.Add(msLink);

            // Produce JS text from DataSet
            List<DotClass> point = new List<DotClass>();
            foreach (DataRow theRow in dsMap.Tables[0].Rows)
            {
                int photoID = ImagesDA.GetImageForMap(projectID);
                point.Add(new DotClass(Convert.ToString(theRow["Latitude"]), Convert.ToString(theRow["Longitude"]), Convert.ToInt32(point.Count), Convert.ToString(theRow["StreetName"]), Convert.ToString(theRow["City"]), photoID));
            }
            int count = Convert.ToInt32(point.Count);
            string js = VirtualEarth.ResultsMap(point.ToArray(), count);
            Literal clientScript = new Literal();
            clientScript.Text = js;
            this.Page.Header.Controls.Add(clientScript);
        }
    }

     

    The codebehind is very specific to the app and may not be much help....

     

Page 1 of 1 (3 items)