Search Results

Search found 44 results on 2 pages for 'tabcontainer'.

Page 2/2 | < Previous Page | 1 2 

  • ASP.net Ajax tab container not appearing

    - by Eyla
    I created new web project using VS 2008 with enabled Ajax template with C# and Framework 3.5. I added Ajax reference to the project and I can see all Ajax toolkit in my tool box. The problem that when I add tab container with Tab Panels then run the projects nothing appear on the browser and I tried few browsers. I'm including my code and I wish that someone would help me. Regards, My Code: ................................................................ <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Contacts._Default" %> <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %> <!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>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <div> <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0"> <asp:TabPanel runat="server" HeaderText="TabPanel1" ID="TabPanel1"> <ContentTemplate> tab 1 </ContentTemplate> </asp:TabPanel> <asp:TabPanel runat="server" HeaderText="TabPanel2" ID="TabPanel2"> <ContentTemplate> tab 2 </ContentTemplate> </asp:TabPanel> <asp:TabPanel runat="server" HeaderText="TabPanel3" ID="TabPanel3"> <ContentTemplate> tab 3 </ContentTemplate> </asp:TabPanel> </asp:TabContainer> </div> </form> </body> </html>

    Read the article

  • how to display image in repeater after AJAX AsyncFileUpload ?

    - by Gordon Shamway
    Hello i am using the AsyncFileUpload from the ajaxtoolkit, upter the upload is complete , i want to display all the images that were uploaded (and their URL is inserted into the DB) with my repeater and binding method. but its not working! the images are uploaded, the DB insert works file, but i cant see the images after the repeater is dinded. (i have to mention that if i go step by step, i do see that the ITEMBOUND is being binded and executed) <ajax:TabContainer runat="server" ID="testTab"> <ajax:TabPanel runat="server" ID="testTabContainer"> <ContentTemplate> <ajax:AsyncFileUpload ID="uploadAsyncImage" runat="server" OnUploadedComplete="InsertToTemp" ThrobberID="Throbber"/> <asp:Label ID="Throbber" runat="server" Style="display: none"> <img src="Images/indicator.gif" align="absmiddle" alt="loading" /> </asp:Label> <br /> <asp:UpdatePanel runat="server" ID="pnlImages" UpdateMode="Conditional" ChildrenAsTriggers="true"> <ContentTemplate> <asp:Repeater runat="server" ID="rptImages" > <ItemTemplate> <a href="<%# DataBinder.Eval(Container.DataItem, "PicURL")%>" rel="lightbox"> <asp:Image ImageUrl='<%# DataBinder.Eval(Container.DataItem, "PicURL")%>' Width="50" Height="50" runat="server" ID="testPic" /> </a> </ItemTemplate> </asp:Repeater> </ContentTemplate> </asp:UpdatePanel> </ContentTemplate> </ajax:TabPanel> </ajax:TabContainer> </form> also adding my Code Behind, since it might be important or will help you get an idea of what i am trying to do.private void BindRepater() { ProjDataContext db = DbContext.DbContextProvider(); var pic = from p in db.TempProdCats where p.SessionID == Session.SessionID.ToString() select new { PicURL = p.PicURL }; rptImages.DataSource = pic; rptImages.DataBind(); pnlImages.Update(); } protected void rptImages_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { Image lblCat = (Image)e.Item.FindControl("testPic"); lblCat.ImageUrl = (string)DataBinder.Eval(e.Item.DataItem, "PicURL"); pnlImages.Update(); } } your help will be highly appreciated , if any of you got any idea how to make it work...

    Read the article

  • How to check if the tab page is dirty and prompt the user to save before navigating away using ajaxtoolkit tab control in ASP.NET

    Step 1: Put a hidden variable in Update panel <asp:HiddenField ID="hfIsDirty" runat="server" Value="0" /> Step 2: Put the following code in ajaxcontrol tool kit tabcontainer OnClientActiveTabChanged="ActiveTabChanged" Copy the following script in the aspx page. <script type="text/javascript">       //Trigger Server side post back for the Tab container       function ActiveTabChanged(sender, e) {           __doPostBack('<%= tcBaseline.ClientID %>', '');       }       //Sets the dirty flag if the page is dirty       function setDirty() {           var hf = document.getElementById("<%=hfIsDirty.ClientID%>");           if (hf != null)               hf.value = 1;       }       //Resets the dirty flag after save       function clearDirty() {           var hf = document.getElementById("<%=hfIsDirty.ClientID%>");           hf.value = 0;       }       function showMessage() { return "page is dirty" }       function setControlChange() {           if (typeof (event.srcElement) != 'undefined')           { event.srcElement.onchange = setDirty; }       }       function checkDirty() {           var tc = document.getElementById("<%=tcBaseline.ClientID%>");           var hf = document.getElementById("<%=hfIsDirty.ClientID%>");           if (hf.value == "1") {               var conf = confirm("Do you want o loose unsaved changes? Please Cancel to stay on page or OK to continue ");               if (conf) {                   clearDirty();                   return true;               }               else {                   var e = window.event;                   e.cancelBubble = true;                   if (e.stopPropagation) e.stopPropagation();                   return false;               }           }           else               return true;       }       document.body.onclick = setControlChange;       document.body.onkeyup = setControlChange;       var onBeforeUnloadFired = false;       // Function to reset the above flag.       function resetOnBeforeUnloadFired() {           onBeforeUnloadFired = false;       }       function doBeforeUnload() {           var hf = document.getElementById("<%=hfIsDirty.ClientID%>");           // If this function has not been run before...           if (!onBeforeUnloadFired) {               // Prevent this function from being run twice in succession.               onBeforeUnloadFired = true;               // If the form is dirty...               if (hf.value == "1") {                   event.returnValue = "If you continue you will lose any changes that you have made to this record.";               }           }           window.setTimeout("resetOnBeforeUnloadFired()", 1000);       }       if (window.body) {           window.body.onbeforeunload = doBeforeUnload;       }       else           window.onbeforeunload = doBeforeUnload;   </script> Step 3: Here is how the tabcontrol should look like <asp:UpdatePanel ID="upTab" runat="server" UpdateMode="conditional">                     <ContentTemplate>                         <ajaxtoolkit:TabContainer ID="tcBaseline" runat="server" Height="400px" OnClientActiveTabChanged="ActiveTabChanged">                             <ajaxtoolkit:TabPanel ID="tpPersonalInformation" runat="server">                                 <HeaderTemplate>                                     <asp:Label ID="lblPITab" runat="server" Text="<%$ Resources:Resources, Baseline_Tab_PersonalInformation %>"                                         onclick="checkDirty();"></asp:Label>                                 </HeaderTemplate>                                 <ContentTemplate>                                     <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder> </ContentTemplate>                             </ajaxtoolkit:TabPanel> span.fullpost {display:none;}

    Read the article

  • How to check if the tab page is dirty and prompt the user to save before navigating away using ajaxtoolkit tab control in ASP.NET

    Step 1: Put a hidden variable in Update panel <asp:HiddenField ID="hfIsDirty" runat="server" Value="0" /> Step 2: Put the following code in ajaxcontrol tool kit tabcontainer OnClientActiveTabChanged="ActiveTabChanged" Copy the following script in the aspx page. <script type="text/javascript">       //Trigger Server side post back for the Tab container       function ActiveTabChanged(sender, e) {           __doPostBack('<%= tcBaseline.ClientID %>', '');       }       //Sets the dirty flag if the page is dirty       function setDirty() {           var hf = document.getElementById("<%=hfIsDirty.ClientID%>");           if (hf != null)               hf.value = 1;       }       //Resets the dirty flag after save       function clearDirty() {           var hf = document.getElementById("<%=hfIsDirty.ClientID%>");           hf.value = 0;       }       function showMessage() { return "page is dirty" }       function setControlChange() {           if (typeof (event.srcElement) != 'undefined')           { event.srcElement.onchange = setDirty; }       }       function checkDirty() {           var tc = document.getElementById("<%=tcBaseline.ClientID%>");           var hf = document.getElementById("<%=hfIsDirty.ClientID%>");           if (hf.value == "1") {               var conf = confirm("Do you want o loose unsaved changes? Please Cancel to stay on page or OK to continue ");               if (conf) {                   clearDirty();                   return true;               }               else {                   var e = window.event;                   e.cancelBubble = true;                   if (e.stopPropagation) e.stopPropagation();                   return false;               }           }           else               return true;       }       document.body.onclick = setControlChange;       document.body.onkeyup = setControlChange;       var onBeforeUnloadFired = false;       // Function to reset the above flag.       function resetOnBeforeUnloadFired() {           onBeforeUnloadFired = false;       }       function doBeforeUnload() {           var hf = document.getElementById("<%=hfIsDirty.ClientID%>");           // If this function has not been run before...           if (!onBeforeUnloadFired) {               // Prevent this function from being run twice in succession.               onBeforeUnloadFired = true;               // If the form is dirty...               if (hf.value == "1") {                   event.returnValue = "If you continue you will lose any changes that you have made to this record.";               }           }           window.setTimeout("resetOnBeforeUnloadFired()", 1000);       }       if (window.body) {           window.body.onbeforeunload = doBeforeUnload;       }       else           window.onbeforeunload = doBeforeUnload;   </script> Step 3: Here is how the tabcontrol should look like <asp:UpdatePanel ID="upTab" runat="server" UpdateMode="conditional">                     <ContentTemplate>                         <ajaxtoolkit:TabContainer ID="tcBaseline" runat="server" Height="400px" OnClientActiveTabChanged="ActiveTabChanged">                             <ajaxtoolkit:TabPanel ID="tpPersonalInformation" runat="server">                                 <HeaderTemplate>                                     <asp:Label ID="lblPITab" runat="server" Text="<%$ Resources:Resources, Baseline_Tab_PersonalInformation %>"                                         onclick="checkDirty();"></asp:Label>                                 </HeaderTemplate>                                 <ContentTemplate>                                     <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder> </ContentTemplate>                             </ajaxtoolkit:TabPanel> span.fullpost {display:none;}

    Read the article

  • Jquery runtime error: object expected

    - by Joris
    The Jquery script that controls my tabcontainer gives an "object expected" runtime error. I honestly can't find the reason why: $(document).ready(function() { //When page loads... $(".tab_content").hide(); //Hide all content $("ul.tabs li:first").addClass("active").show(); //Activate first tab $(".tab_content:first").show(); //Show first tab content //On Click Event $("ul.tabs li").click(function() { $("ul.tabs li").removeClass("active"); //Remove any "active" class $(this).addClass("active"); //Add "active" class to selected tab $(".tab_content").hide(); //Hide all tab content var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content $(activeTab).fadeIn(); //Fade in the active ID content return false; }); }); Has it something to do with the stylesheet?

    Read the article

  • JS Anonymous Scope...

    - by Simon
    this Application.EventManager.on('Click', function(args) { // event listener, args is JSON TestAction.getContents(args.node.id, function(result, e) { console.log(result); this.add({ title: args.node.id, html: result }).show(); }); }); I'm really struggling with scope and anonymous functions... I want this (on the 1st line) to be the same object as this (on the 5th line)... .call() and .apply() seemed to be the right sort of idea but I don't want to trigger the event... just change it's scope.... For a bit of contexts... the this in question is a TabContainer and TestAction is a RPC that returns content... Thanks....

    Read the article

  • jQuery-UI tabs - load just once

    - by user256034
    I'd like the load content of my tabs thru AJAX, but only on the first tab click. Now the tabs gets loaded every time I click on any tab. Is this possible ? My html <div id="tabContainer"> <ul> <li><a href="/Home/Tab1">Tab1</a></li> <li><a href="/Home/Tab2">Tab2</a></li> <li><a href="/Home/Tab3">Tab3</a></li> </ul> </div> EDIT I cannot use the Cache option,because the content in the tabs may change..

    Read the article

  • jquery change function into code for plugin

    - by jaap Klevering
    Help would be greatly appreciated. What is the correct markup that would change this function into a plugin. I tried, but cant make it to work. $(document).ready(function(){ $('ul.tabNav a').click(function() { var curChildIndex = $(this).parent().prevAll().length + 1; $(this).parent().parent().children('.current').removeClass('current'); $(this).parent().addClass('current'); $(this).parent().parent().next('.tabContainer').children('.current').slideUp('fast',function() { $(this).removeClass('current'); $(this).parent().children('div:nth-child('+curChildIndex+')').slideDown('normal',function() { $(this).addClass('current'); }); }); return true; }); });

    Read the article

  • jQuery automatic scroll / slideshow

    - by tony noriega
    Could i modify this existing code to automatically scroll through the list items to display the content? Sorry, the: ul li a {} links. Maybe using "interval" method? $(document).ready(function(){ $('ul.tabNav a').click(function() { var curChildIndex = $(this).parent().prevAll().length + 1; $(this).parent().parent().children('.current').removeClass('current'); $(this).parent().addClass('current'); $(this).parent().parent().prev('.tabContainer').children('.current').fadeOut('fast',function() { $(this).parent().children('div:nth-child('+curChildIndex+')').fadeIn('fast',function() { $(this).addClass('current'); }); $(this).removeClass('current'); }); return false; }); });

    Read the article

  • Ajax Tabs implementation problem .

    - by SmartDev
    Hi , I have Implement ajax tabs and i have four tabs in it . In the four tabs i have four grid views with paging and sorting .The tabs are looking good i can see the grid ,but the problem is my first tab sorting works fine, where if i click on any other tab and click on the grid it goes to my first tab again . One more thing i want to change the background color of each tab. Can anyone help please here is my source code: <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <asp:ScriptManager ID="ScMMyTabs" runat="server"> </asp:ScriptManager> <cc1:TabContainer ID="TCMytabs" ActiveTabIndex="0" runat="server"> <cc1:TabPanel ID="TpMyreq" runat="server" CssClass="TabBackground" HeaderText="My request"> <ContentTemplate> <table> <tr> <td> <asp:Button ID="btnexportMyRequestCsu" runat="server" Text="Export To Excel" CssClass="LabelDisplay" OnClick="btnexportMyRequestCsu_Click" /> </td> </tr> <tr> <td> <asp:GridView ID="GdvMyrequest" runat="server" CssClass="Mytabs" BackColor="White" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" CellPadding="3" CellSpacing="1" GridLines="None" OnPageIndexChanging="GdvMyrequest_PageIndexChanging" OnSorting="GdvMyrequest_Sorting" EmptyDataText="No request found for this user"> <RowStyle BackColor="#DEDFDE" ForeColor="Black" /> <FooterStyle BackColor="#C6C3C6" ForeColor="Black" /> <PagerStyle BackColor="Control" ForeColor="Gray" HorizontalAlign="Left" /> <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" /> <PagerSettings Position="TopAndBottom" /> <Columns> <asp:TemplateField> <HeaderTemplate> Row No </HeaderTemplate> <ItemTemplate> <%# Container.DataItemIndex + 1 %> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> </td> </tr> <tr> <td> <asp:Label ID="lblmessmyrequestAhk" runat="server" CssClass="labelmess"></asp:Label> </td> </tr> </table> </ContentTemplate> </cc1:TabPanel> <cc1:TabPanel ID="TpMyPaymentCc" runat="server" HeaderText="Payments Credit Card" > <ContentTemplate> <table> <tr> <td> <asp:GridView ID="GdvmypaymentsCc" runat="server" CssClass="Mytabs" BackColor="White" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" CellPadding="3" CellSpacing="1" GridLines="None" OnPageIndexChanging="GdvmypaymentsCc_PageIndexChanging" OnSorting="GdvmypaymentsCc_Sorting" EmptyDataText="No Data"> <RowStyle BackColor="#DEDFDE" ForeColor="Black" /> <FooterStyle BackColor="#C6C3C6" ForeColor="Black" /> <PagerStyle BackColor="Control" ForeColor="Gray" HorizontalAlign="Left" /> <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" /> <PagerSettings Position="TopAndBottom" /> </asp:GridView> </td> </tr> <tr> <td> <asp:Label ID="lblmessmypaymentsCsu" runat="server" CssClass="labelmess"></asp:Label> </td> </tr> </table> </ContentTemplate> </cc1:TabPanel> <cc1:TabPanel ID="TpMyPaymentsCk" runat="server" HeaderText="Payments Check" > <ContentTemplate> <asp:GridView ID="GdvmypaymentsCk" runat="server" CssClass="Mytabs" BackColor="White" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" CellPadding="3" CellSpacing="1" GridLines="None" OnPageIndexChanging="GdvmypaymentsCk_PageIndexChanging" OnSorting="GdvmypaymentsCk_Sorting" EmptyDataText="No Data"> <RowStyle BackColor="#DEDFDE" ForeColor="Black" /> <FooterStyle BackColor="#C6C3C6" ForeColor="Black" /> <PagerStyle BackColor="Control" ForeColor="Gray" HorizontalAlign="Left" /> <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" /> <PagerSettings Position="TopAndBottom" /> </asp:GridView> </ContentTemplate> </cc1:TabPanel> <cc1:TabPanel ID="TpMyCalls" runat="server" HeaderText="Calls" > <ContentTemplate> <table> <tr> <td> <asp:GridView ID="GdvSelectcallsP" runat="server" CssClass="Mytabs" BackColor="White" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" CellPadding="3" CellSpacing="1" GridLines="None" OnPageIndexChanging="GdvSelectcallsP_PageIndexChanging" OnRowDataBound="GdvSelectcallsP_RowDataBound" OnSorting="GdvSelectcallsP_Sorting" > <RowStyle BackColor="#DEDFDE" ForeColor="Black" /> <FooterStyle BackColor="#C6C3C6" ForeColor="Black" /> <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" /> <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" /> <Columns> <asp:TemplateField> <HeaderTemplate> Row No </HeaderTemplate> <ItemTemplate> <%# Container.DataItemIndex + 1 %> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> </td> </tr> <tr> <td> <asp:Label ID="lblmessselectcallsAhkP" runat="server" CssClass="labelmess"></asp:Label> </td> </tr> </table> </ContentTemplate> </cc1:TabPanel> </cc1:TabContainer> </asp:Content>

    Read the article

  • Some VS 2010 RC Updates (including patches for Intellisense and Web Designer fixes)

    - by ScottGu
    [In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu] We are continuing to make progress on shipping Visual Studio 2010.  I’d like to say a big thank you to everyone who has downloaded and tried out the VS 2010 Release Candidate, and especially to those who have sent us feedback or reported issues with it. This data has been invaluable in helping us find and fix remaining bugs before we ship the final release. Last month I blogged about a patch we released for the VS 2010 RC that fixed a bad intellisense crash issue.  This past week we released two additional patches that you can download and apply to the VS 2010 RC to immediately fix two other common issues we’ve seen people run into: Patch that fixes crashes with Tooltip invocation and when hovering over identifiers The Visual Studio team recently released a second patch that fixes some crashes we’ve seen when tooltips are displayed – most commonly when hovering over an identifier to view a QuickInfo tooltip. You can learn more about this issue from this blog post, and download and apply the patch here. Patch that fixes issues with the Web Forms designer not correctly adding controls to the auto-generated designer files The Visual Web Developer team recently released a patch that fixes issues where web controls are not correctly added to the .designer.cs file associated with the .aspx file – which means they can’t be programmed against in the code-behind file.  This issue is most commonly described as “controls are not being recognized in the code-behind” or “editing existing .aspx files regenerates the .aspx.designer.(vb or cs) file and controls are now missing” or “I can’t embed controls within the Ajax Control Toolkit TabContainer or the <asp:createuserwizard> control”. You can learn more about the issue here, and download the patch that fixes it here. Common Cause of Intellisense and IDE sluggishness on Windows XP, Vista, Win Server 2003/2008 systems Over the last few months we’ve occasionally seen reports of people seeing tremendous slowness when typing and using intellisense within VS 2010 despite running on decent machines.  It took us awhile to track down the cause – but we have found that the common culprit seems to be that these machines don’t have the latest versions of the UIA (Windows Automation) component installed. UIA 3 ships with Windows 7, and is a recommended Windows Update patch on XP and Vista (which is why we didn’t see the problem in our tests – since our machines are patched with all recommended updates).  Many systems (especially on XP) don’t automatically install recommended updates, though, and are running with older versions of UIA. This can cause significant performance slow-downs within the VS 2010 editor when large lists are displayed (for example: with intellisense). If you are running on Windows XP, Vista, or Windows Server 2003 or 2008 and are seeing any performance issues with the editor or IDE, please install the free UIA 3 update that can be downloaded from this page.  If you scroll down the page you’ll find direct links to versions for each OS. Note that we are making improvements to the final release of VS 2010 so that we don’t have big perf issues when UIA 3 isn’t installed – and we are also adding a message within the IDE that will warn you if you don’t have UIA 3 installed and accessibility is activated. Improved Text Rendering with WPF 4 and VS 2010 We recently made some nice changes to WPF 4 which improve the text clarity and text crispness over what was in the VS 2010/.NET 4 Release Candidate.  In particular these changes improve scenarios where you have a dark background with light text. You can learn more about these improvements in this WPF Team blog post.  These changes will be in the final release of VS 2010 and .NET 4. Hope this helps, Scott

    Read the article

  • Dojo Widgets not rendering when returned in response to XhrPost

    - by lazynerd
    I am trying to capture the selected item in a Dijit Tree widget to render remaining part of the web page. Here is the code that captures the selected item and sends it to Django backend: <div dojoType="dijit.Tree" id="leftTree" store="leftTreeStore" childrenAttr="folders" query="{type:'folder'}" label="Explorer"> <script type="dojo/method" event="onClick" args="item"> alert("Execute of node " + termStore.getLabel(item)); var xhrArgs = { url: "/load-the-center-part-of-page", handleAs: "text", postData: dojo.toJson(leftTreeStore.getLabel(item), true), load: function(data) { dojo.byId("centerPane").innerHTML = data; //window.location = data; }, error: function(error) { dojo.byId("centerPane").innerHTML = "<p>Error in loading...</p>"; } } dojo.byId("centerPane").innerHTML = "<p>Loading...</p>"; var deferred = dojo.xhrPost(xhrArgs); </script> </div> The remaining part of the page contains HTML code with dojo widgets. This is the code sent back as 'response' to the select item event. Here is a snippet: <div dojoType="dijit.layout.TabContainer" id="tabs" jsId="tabs"> <div dojoType="dijit.layout.BorderContainer" title="Dashboard"> <div dojoType="dijit.layout.ContentPane" region="bottom"> first tab </div> </div> <div dojoType="dijit.layout.BorderContainer" title="Compare"> <div dojoType="dijit.layout.ContentPane" region="bottom"> Second Tab </div> </div> </div> It renders this html 'response' but without the dojo widgets. Is handleAs: "text" in XhrPost the culprit here?

    Read the article

  • jQuery-UI How-to stop realoding the tabs

    - by user256034
    I'm using jQuery UI tabs functionality to load tab content via Ajax. But I need to load the tabs only once. At the first request. <div id="tabContainer"> <ul> <li><a href="/Home/Tab1">Tab1</a></li> <li><a href="/Home/Tab2">Tab2</a></li> <li><a href="/Home/Tab3">Tab3</a></li> </ul> </div> I hooked up the select event. I'm able to see if the content is already loaded or not.But I'm missng the point how to stop jQuery from sending the request. $("#tabs").tabs({ select: function(event, ui) { if (ui.panel.innerHTML != '') { //What to do here to stop jQuery from sending the request. return; } } });

    Read the article

  • How to implement a download for dynamic files in asp.net with masterpages

    - by Tim
    Hello, the title says it all. I have seen some similar questions on SO like this or this, but either i have overlooked something or my requirement is different, neither works. My situation is following: i have a Masterpage one of its contentpage is called MasterData.aspx MasterData has an asp.net ajax tabcontainer control with one usercontrol in every tabpanel these usercontrols(f.e. MD_Customer.ascx)hold the main content(like a normal page) they all have GridViews in it and i want to provide an Excel-Export-Button What i've tried is is to use an iframe like here. But the function that adds the iframe to the document gets never called and therefore i never see the save-as-dialog. Maybe this is caused by using a MasterPage. Does somebody has an idea on how to provide a button in an UpdatePanel that causes an async postback, so that i can generate a CSV dynamically in codebehind and write it to the response? Thank you in advance. aspx-markup: <asp:UpdatePanel ID="UpdGridInfo" runat="server" > <ContentTemplate> <asp:Label ID="LblInfo" Font-Underline="false" runat="server" CssClass="content" ></asp:Label>&nbsp;&nbsp; <asp:ImageButton ToolTip="export to Excel" style="vertical-align:bottom" ID="BtnExcelExport" ImageUrl="~/images/excel2007logo.png" runat="server" /> </ContentTemplate> </asp:UpdatePanel> and the BtnExportExcel codebehind handler(of course it cannot work to write the csv to the response of this page): Private Sub BtnExcelExport_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles BtnExcelExport.Click Dim csv As String = tableToCsv(DirectCast(Me.GridSource, DataTable)) Response.AddHeader("Content-disposition", "attachment; filename=RuleConfigurationFile.csv") Response.ContentType = "application/octet-stream" Response.Write(csv) Response.End() End Sub

    Read the article

  • Processing JSON data with jQuery - strange results needing alert()

    - by James
    I have this code below. I randomly ran across that it will work if I have that alert message exactly where it is. If I take it out or move it to any other spot the tabs will not appear. What exactly is that alert doing that allows the code to work and how can I make it work without the alert? If I move the each loop into the success section it does not work even with the alert. $.ajax({ type: "GET", url: "../ajax.php", data: "action=tabs", dataType: "json", success: function(data){ Projects = data; } }); alert("yes"); $.each(Projects, function(i){ /* Sequentially creating the tabs and assigning a color from the array: */ var tmp = $('<li><a href="#" class="tab green">'+Projects[i].name+'<span class="left" /><span class="right" /></a></li>'); /* Setting the page data for each hyperlink: */ tmp.find('a').data('page','../ajax.php?action=lists&projectID='+Projects[i].project_id); /* Adding the tab to the UL container: */ $('ul.tabContainer').append(tmp); }); The ajax code is retuning json with this code $query = mysql_query("SELECT * FROM `projects` ORDER BY `position` ASC"); $projects = array(); // Filling the $projects array with new project objects: while($row = mysql_fetch_assoc($query)){ $projects[] = $row; } echo json_encode($projects); The returning data is very small and very fast so I don't think that is the problem.

    Read the article

  • dojo layout tutorial dor version 1.7 doesn't work for 1.7.2

    - by Sheena
    This is sortof a continuation to dojo1.7 layout acting screwy. So I made some working widgets and tested them out, i then tried altering my work using the tutorial at http://dojotoolkit.org/documentation/tutorials/1.7/dijit_layout/ to make the layout nice. After failing at that in many interesting ways (thus my last question) I started on a new path. My plan is now to implement the layout tutorial example and then stick in my widgets. For some reason even following the tutorial wont work... everything loads then disappears and I'm left with a blank browser window. Any ideas? It just struck me that it could be browser compatibility issues, I'm working on Firefox 13.0.1. As far as I know Dojo is supposed to be compatible with this... anyway, have some code: HTML: <body class="claro"> <div id="appLayout" class="demoLayout" data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="design: 'headline'"> <div class="centerPanel" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'center'"> <div> <h4>Group 1 Content</h4> <p>stuff</p> </div> <div> <h4>Group 2 Content</h4> </div> <div> <h4>Group 3 Content</h4> </div> </div> <div class="edgePanel" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'top'"> Header content (top) </div> <div id="leftCol" class="edgePanel" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'left', splitter: true"> Sidebar content (left) </div> </div> </body> Dojo Configuration: var dojoConfig = { baseUrl: "${request.static_url('mega:static/js')}", //this is in a mako template tlmSiblingOfDojo: false, packages: [ { name: "dojo", location: "libs/dojo" }, { name: "dijit", location: "libs/dijit" }, { name: "dojox", location: "libs/dojox" }, ], parseOnLoad: true, has: { "dojo-firebug": true, "dojo-debug-messages": true }, async: true }; other js stuff: require(["dijit/layout/BorderContainer", "dijit/layout/TabContainer", "dijit/layout/ContentPane", "dojo/parser"]); css: html, body { height: 100%; margin: 0; overflow: hidden; padding: 0; } #appLayout { height: 100%; } #leftCol { width: 14em; }

    Read the article

  • Dojox grid having problem with Contentpane

    - by ice
    the grid appears properly on template's first loading. But when you click the paging button to load flooders.php thru list_result1() only the paging buttons will appear. I already tested the flooders.php outside the template and it works properly. what seems to be the problem? and what are the tools that i can use to see if the javascript is loading properly because i think the error console of ff browser which i use to track errors won't give you that much info when you are working with contentpane. thanks! ice note: below are the codes... ** from contentpane js function list_result1(){ args=""; uri = "flooders.php" + args; dojo.xhrGet( { url: uri, handleAs: "text", timeout: 500, // Time in milliseconds load: function(response, ioArgs) { //alert(response); dojo.byId("flooders_table").innerHTML = response; return response; }, // The ERROR function will be called in an error case. error: function(response, ioArgs) { console.error("HTTP status code: ", ioArgs.xhr.status); return response; } }); //end of dojo.xhrGet } **flooders.php starts here*** @import "js/dojo-0.9.0/dojo/resources/dojo.css"; @import "js/dojo-0.9.0/dijit/themes/tundra/tundra.css"; @import "js/dojo-0.9.0/dijit/themes/tundra/tundra_rtl.css"; @import "css/ash.css"; @import "js/dojo-0.9.0/dojox/grid/resources/Grid.css"; @import "js/dojo-0.9.0/dojox/grid/resources/tundraGrid.css"; @import "js/dojo-0.9.0/dojo/resources/dojo.css"; @import "js/dojo-0.9.0/dijit/tests/css/dijitTests.css"; .dojoxGridRowEditing td { background-color: #F4FFF4; } .dojoxGrid input, .dojoxGrid select, .dojoxGrid textarea { margin: 0; padding: 0; border-style: none; width: 100%; font-size: 100%; font-family: inherit; } .dojoxGrid input { } .dojoxGrid select { } .dojoxGrid textarea { } #controls { padding: 0px 0; } #controls button { margin-left: 10px; } .myGrid { width: 550px; height: 230px; margin-left: 20px; /* border: 1px solid silver; */ } echo " // it has script heading here (function(){ // some sample data // global var 'data' data = { identifier: 'id', label: 'id', items: [] }; data_list = [ $banlist ]; var rows = $listnum ; var x=1; for(var i=0, l=data_list.length; i // global var 'test_store' test_store = new dojo.data.ItemFileWriteStore({data: data}); })(); // it has ending here "; ?   -- here's the javascript dojo.require("dijit.TitlePane"); dojo.require("dijit.dijit"); dojo.require("dojox.grid.DataGrid"); dojo.require("dojo.data.ItemFileWriteStore"); dojo.require("dojo.parser"); // scan page for widgets and instantiate them dojo.require("dijit.layout.LayoutContainer"); dojo.require("dijit.layout.AccordionContainer"); dojo.require("dijit.layout.ContentPane"); dojo.require("dijit.layout.TabContainer"); dojo.require("dijit.Editor"); dojo.require("dijit._editor.plugins.AlwaysShowToolbar"); dojo.require("dijit._editor.plugins.LinkDialog"); //this must be inlcuded below function() selectCell = { styles: 'text-align: center;', type: dojox.grid.cells.Select }; gridLayout = { defaultCell: { width: 5, styles: 'text-align: right;' }, rows: [ [ { name: 'Mark', width: 3, field: 'col1', editable: true, styles: 'text-align: center;', type: dojox.grid.cells.Bool }, { name: 'Id', width: 3, field: 'id' , editable: false }, { name: 'Username', field: 'col2', editable: false, styles: '', width: '70%' }, { name: 'Reason', field: 'col3', editable: false , styles: '', width: '100%' }, { name: 'Date Banned', field: 'col4', editable: false , styles: '', width: '70%' } ] ] };

    Read the article

  • ZendX_JQuery dialogContainer usage

    - by Kalle Johansson
    Hi ! I'm aming to make use of the ZendX_JQuery dialogContainer view helper, in order to produce a modal window, were users can input specified information(for example send a message). I'm trying to use the dialogContainer view helper in this fashion. First of, include the ZendX library in the applications library folder. Secondly, include the following row in the initViewHelper method within the Bootstrap.php file "$view-addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper');" third, adding the following conditional enabling of js in the layout.phtml "<?php if($this->jQuery()->isEnabled()){ $this->jQuery()->setLocalPath($this->baseUrl() .'/js/jquery/js/jquery-1.4.2.min.js') ->setUiLocalPath($this->baseUrl() .'/js/jquery/js/jquery-ui-1.8.custom.min.js') ->addStylesheet($this->baseUrl() .'/js/jquery/css/ui-lightness/jquery-ui-1.8.custom.css'); echo $this->jQuery(); } ?>" fourth, creating my Application_Form_JQueryForm extending ZendX_JQuery_Form "<?php class Application_Form_JQueryForm extends ZendX_JQuery_Form { private $form; public function init() { $this->form = $this->setAction(Zend_Controller_Front::getInstance()->getBaseUrl() . '/index/index') ->setMethod('post'); $this->form->setDecorators(array( 'FormElements', 'Form', array ('DialogContainer', array( 'id' => 'tabContainer', 'style' => 'width: 600px;', 'title' => 'Send a private message to Kalle', 'JQueryParams' => array( 'tabPosition' => 'top', ), )), )); $topic = new Zend_Form_Element_Text('topic'); $topic->setValue('topic') ->setRequired(true) ->setValidators(array('validators' => array( 'validator' => 'StringLength', 'options' => array(1,15) ))) ->setDecorators(array( 'ViewHelper', 'Description', 'Errors', array('HtmlTag', array('tag' => 'dl')))); $textarea = new Zend_Form_Element_Textarea('textarea'); $textarea->setValue('post a comment') ->setAttribs(array( 'rows' => 4, 'cols' => 20 )) ->setRequired(true) ->setValidators(array('validators' => array( 'validator' => 'StringLength', 'options' => array(1,15) ))) ->setDecorators(array( 'ViewHelper', 'Description', 'Errors', array('HtmlTag', array('tag' => 'dl')))); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Send your comment') ->setDecorators(array( 'ViewHelper', 'Description', 'Errors', array('Description', array('escape' => false, 'tag' => 'span')), array('HtmlTag', array('tag' => 'dl')))) ->setDescription('or <a href="/index/index/send/false">Cancel</a>'); $this->form->addElements(array($topic, $textarea, $submit)); } }" This form is then instanciated in the controllers action method, and called in the view. And so to the problem of mine, no matter what i try, in order to for instance set, the width of the dialogContainer or any other parameter (color, css, height, so on and so forth), this being in the JQueryForm's setDecorator part for the form, i can't seem to get any change whatsoever in the resulting modal when called in the view, any help in the proper direction would be greatly appreciated Thanks in advance, Kalle Johansson

    Read the article

  • September 2012 Release of the Ajax Control Toolkit

    - by Stephen.Walther
    I’m excited to announce the September 2012 release of the Ajax Control Toolkit! This is the first release of the Ajax Control Toolkit which supports the .NET 4.5 framework. We also continue to support ASP.NET 3.5 and ASP.NET 4.0. With this release, we’ve made several important bug fixes. The Superexpert team focused on fixing the highest voted issues associated with the CascadingDropDown control. I’ve created a list of these bug fixes later in this blog post. You can download the latest release of the Ajax Control Toolkit by visiting the following page at CodePlex: http://AjaxControlToolkit.CodePlex.com Alternatively, you can install the latest version of the Ajax Control Toolkit using NuGet by firing off the following command from the Package Manager Console: Install-Package AjaxControlToolkit Using the Ajax Control Toolkit with ASP.NET 4.5 Let me walk through the steps for using the Ajax Control Toolkit with ASP.NET 4.5. First, I’ll create a new ASP.NET 4.5 website with Visual Studio 2012. I’ll create the new website with the ASP.NET Web Forms Application template: When you create a new ASP.NET 4.5 site with the ASP.NET Web Forms Application template, you get a starter website. If you run the site, then you get a page with default content: Let me show you how you can add the Ajax Control Toolkit Calendar control to the homepage of this starter site. The first step is to use NuGet to install the Ajax Control Toolkit. Right-click the References folder in the Solution Explorer window and select the menu option Manage NuGet Packages. In the Manage NuGet Packages dialog, use the search box to search for the Ajax Control Toolkit (enter “AjaxControlToolkit”). After you find it, click the Install button to add the Ajax Control Toolkit to your project. That’s all you have to do to install the Ajax Control Toolkit! Now we are ready to start using the Ajax Control Toolkit controls. Open the default.aspx page so we can modify the contents of the page. Erase everything contained in the Content control with the ID of BodyContent. After erasing the content, declare the following two controls: <asp:TextBox ID="vacationDate" runat="server" /> <ajaxToolkit:CalendarExtender TargetControlID="vacationDate" runat="server" /> The first control is a standard ASP.NET TextBox control and the second control is an Ajax Control Toolkit Calendar control. You should get intellisense as you type out the Ajax Control Toolkit Calendar control. If you don’t, then close and re-open the Default.aspx page. Now, let’s run our app. Hit the F5 button or select Debug, Start Debugging from the Visual Studio menu. You will get the error message “MsAjaxBundle is not a valid script name”. Don’t despair! We need to update the Master Page so it uses the ToolkitScriptManager instead of the default ScriptManager. Open the Site.Master file and find where the ScriptManager is declared. The ScriptManager should look like this: <asp:ScriptManager runat="server"> <Scripts> <%--Framework Scripts--%> <asp:ScriptReference Name="MsAjaxBundle" /> <asp:ScriptReference Name="jquery" /> <asp:ScriptReference Name="jquery.ui.combined" /> <asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" /> <asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" /> <asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" /> <asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" /> <asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" /> <asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" /> <asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" /> <asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" /> <asp:ScriptReference Name="WebFormsBundle" /> <%--Site Scripts--%> </Scripts> </asp:ScriptManager> We need to make three changes to the ScriptManager: 1) We need to replace the asp:ScriptManager with the ajaxToolkit:ToolkitScriptManager 2) We need to remove the MsAjaxBundle bundle from the ScriptReferences 3) We need to remove the Assembly=”System.Web” attributes from the ScriptReferences After you make these three changes, the ToolkitScriptManager should looks like this: <ajaxToolkit:ToolkitScriptManager runat="server"> <Scripts> <%--Framework Scripts--%> <asp:ScriptReference Name="jquery" /> <asp:ScriptReference Name="jquery.ui.combined" /> <asp:ScriptReference Name="WebForms.js" Path="~/Scripts/WebForms/WebForms.js" /> <asp:ScriptReference Name="WebUIValidation.js" Path="~/Scripts/WebForms/WebUIValidation.js" /> <asp:ScriptReference Name="MenuStandards.js" Path="~/Scripts/WebForms/MenuStandards.js" /> <asp:ScriptReference Name="GridView.js" Path="~/Scripts/WebForms/GridView.js" /> <asp:ScriptReference Name="DetailsView.js" Path="~/Scripts/WebForms/DetailsView.js" /> <asp:ScriptReference Name="TreeView.js" Path="~/Scripts/WebForms/TreeView.js" /> <asp:ScriptReference Name="WebParts.js" Path="~/Scripts/WebForms/WebParts.js" /> <asp:ScriptReference Name="Focus.js" Path="~/Scripts/WebForms/Focus.js" /> <asp:ScriptReference Name="WebFormsBundle" /> <%--Site Scripts--%> </Scripts> </ajaxToolkit:ToolkitScriptManager> After we make these changes, the app should run successfully. You’ll get a page which contains a text field. When you click inside the text field, a popup calendar is displayed. Ajax Control Toolkit and jQuery You might have noticed that the ScriptManager includes a reference to jQuery by default. We did not remove that reference when we converted the ScriptManager to a ToolkitScriptManager. You can use the Ajax Control Toolkit and jQuery side-by-side. Here’s how you can modify the Default.aspx page so that it contains two popup calendars. The first popup calendar is created with the Ajax Control Toolkit and the second popup calendar is created with jQuery: <asp:TextBox ID="vacationDate" runat="server" /> <ajaxToolkit:CalendarExtender TargetControlID="vacationDate" runat="server" /> <input id="birthDate" /> <script> $("#birthDate").datepicker(); </script> Before you can start using jQuery UI plugins, you need to complete one more step. You need to add the jQuery UI themes bundle to the HEAD of the Site.Master page like this: <head runat="server"> <meta charset="utf-8" /> <title><%: Page.Title %> - My ASP.NET Application</title> <asp:PlaceHolder runat="server"> <%: Scripts.Render("~/bundles/modernizr") %> </asp:PlaceHolder> <webopt:BundleReference runat="server" Path="~/Content/css" /> <webopt:BundleReference runat="server" Path="~/Content/themes/base/css" /> <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" /> <meta name="viewport" content="width=device-width" /> <asp:ContentPlaceHolder runat="server" ID="HeadContent" /> </head> The markup above includes a reference to the jQuery UI themes bundle: <webopt:BundleReference runat="server" Path="~/Content/themes/base/css" /> Now that we have made these changes, we can use the Ajax Control Toolkit and jQuery at the same time. When you run your app, you get two popup calendars. When you click in the first text field, the Ajax Control Toolkit calendar appears. When you click in the second text field, the jQuery UI popup calendar appears: Bug Fixes in this Release We made several important bug fixes with this release of the Ajax Control Toolkit and integrated several Pull Requests contributed by the community. Our primary focus during this sprint was fixing issues with the CascadingDropDown control. We fixed the following issues associated with the CascadingDropDown: · 9490 – Don’t disable dropdowns in CascadingDropDown · 14223 – CascadingDropDown Reset or Setting SelectedValue from WebMethod · 12189 – CascadingDropDown not obeying disabled state of DropDownList · 22942 – CascadingDropDown infinite loop (with solution) · 8671 – CascadingDropdown options is null or undefined · 14407 – CascadingDropDown: populated client event happens too often · 17148 – CascadingDropDown – Add “UseHttpGet” property · 10221 – No NotNull check in CascadingDropDown · 12228 – Provide property for case-insensitive DefaultValue lookup in CascadingDropdown We also fixed the following two issues which are not directly related to the CascadingDropDown control: · 27108 – CalendarExtender: Bug when selecting December shifts to January. · 27041 – Input controls with HTML5 types do not post back in Firefox, Chrome, Safari Finally, we integrated several Pull Requests submitted by the community (Thank you community!): · Added French localized resources for the AjaxFileUpload · Resolved an issue which prevented the AjaxFileUpload control from working with pages that require query string variables. · Extended the AjaxFileUploadEventArgs class to include the current file index in the queue and the total number of files in the queue. · Fixed an issue with TabContainer and TabPanel which caused the OnActiveTabChanged event to fire too often. Summary I’m happy to see the Ajax Control Toolkit move forward into the brave new world of ASP.NET 4.5! In this latest release, we focused on ensuring that the Ajax Control Toolkit works smoothly with ASP.NET 4.5 applications. We also fixed the highest voted bugs associated with the CascadingDropDown control and integrated several Pull Request submitted by the community. Once again, I want to thank the Superexpert team for their hard work on this release!

    Read the article

< Previous Page | 1 2