Firefox not rendering contents of a Update panel - firefox

Why does the following code perform a partial render in IE but not in FF?
In FF, the time on the outside of the updatepanel will also refresh, not so in IE.
<form id="form1" runat="server">
<div>
<%=DateTime.Now.ToLongTimeString() %>
</div>
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<p>New time is <%=DateTime.Now.ToLongTimeString() %></p>
<asp:Button ID="Button1" runat="server" Text="Go get it" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Button1" />
</Triggers>
</asp:UpdatePanel>
</form>

Can I know what version of Firefox you are using?
I tested this on Firefox 3.0 and Firefox 3.5 (clean install - no addons).
If I click the button only the new time refreshes, the outer time doesn't. So the partial rendering works.
If you are on Firefox 3.0 or 3.5 can you create a new firefox profile to test this?.

Oleg's comment about the EventName attribute on the AsyncPostBackTrigger is likely correct. However, I would add that the Triggers do not need to be explicitly defined in this case since the Button is contained in the UpdatePanel. Events from contained elements trigger the Async Postback by default so it's unnecessary.

You've got javascript disabled in FF and it's performing a full postback. :-)

Related

ckeditor toolbar doesn't show in asp.net masterpage scenario

I have an asp.net site, .net 4 framework. I'm trying to get the ckeditor up and running. Sorry, I'm a bit new to the ckeditor. There is a quick start guide here that shows you how to implement:
http://docs.ckeditor.com/#!/guide/dev_installation
I originally thought the editor wasn't showing the toolbar. However, after further debug, I believe the ckeditor isn't showing at all, and in fact, the textarea is still all that is showing.
I'm using the same code as on the example in the website. I've reposted that here:
<textarea name="editor1" id="editor1" rows="10" cols="80">
This is my textarea to be replaced with CKEditor.
</textarea>
<script>
// Replace the <textarea id="editor1"> with a CKEditor
// instance, using default configuration.
CKEDITOR.replace('editor1');
</script>
I've included the script ckeditor.js script this way:
<%# Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="DefectEntry3.aspx.cs" Inherits="DefectWriter.DefectEntry3" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script src="App_Data/ckeditor/ckeditor.js"></script>
I'm sure I'm making a simple mistake. Any help is appreciated.
Thanks!
Bob
I had the wrong path in the script source. Once I got the right path all is well.

ModalPopupExtender: Parent page is not disabling

I am trying example of ModalPopupExtender. When popup happens, controls at back of popup are not disabled, that is I can still click on button at the back of pop up. Below is the code
<body>
<form id="form1" runat="server">
<div>
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
</div>
<div>
<asp:Button ID="Button1" runat="server" Text="Button" />
</div>
<div>
<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" DropShadow="true" TargetControlID="Button1"
PopupControlID="Panel1" BackgroundCssClass="backgroundModalPopup" PopupDragHandleControlID="Panel1">
</asp:ModalPopupExtender>
<asp:Panel ID="Panel1" runat="server" BackColor="Aqua" Style="display:none">
This is modal pop up extender : hi
<asp:Button ID="Button2" runat="server" Text="Button" />
</asp:Panel>
</div>
</form>
</body>
Can anyone please let me know the reason why I am not able to disable rest of page? Thanks.
Finally, I got solution on this. The problem was css was not referred in the aspx page(though I addeed code to link my css file). But weired thing is that when I added css to the aspx page by droping css file onto aspx page in the visual studio it worked and when I referred it through code it didn't worked for me. Really strange!!!
Thanks.

dojo.connect not working in IE but sometimes in chrome&firefox

I finally got some parts working here: http://jsfiddle.net/trXBr/5/
but when I put the code back into my project and tried to browse using internet explorer; the button onclick events do not work. Interestingly the one button onclick function to show the dialog works in firefox and chrome. I was excited to have this working in the editor but now if this does not work with all browsers, then this is just really frustrating. I am using version 1.5.1
dojo.connect(loadBtn,'onClick',function(){
userDialog.show();
});
dojo.connect(butt,'onClick',function(evt){
showTab();
});
Any help/ideas appreciated.
EDIT:
Ok using the compatibility mode in IE helps to get the one function working which displays the dialog box.
So as you can see here I have an borderlayout where I want a tabcontainer to be displayed in the middle with a click of a button and this works fine in jsfiddler but not from my code in the browsers;
<div dojoType="dijit.layout.ContentPane" region="center" splitter="true">
<div id="mainTabContainer"dojoType="dijit.layout.TabContainer"
style="width:500px;height:100px;display:none">
<div id="tab1" dojoType="dijit.layout.ContentPane"
title="First Tab" selected="true"
closable="true">First Tab</div>
<div id="tab2" dojoType="dijit.layout.ContentPane"
title="Second Tab" closable="true">
Second Tab
</div>
</div>
</div>
so the display:none but when I click the button I call the following:
dojo.connect(butt,'onClick',function(evt){
showTab();
});
function showTab(){
dijit.byId("mainTabContainer").domNode.style.display = 'block'
dijit.byId("mainTabContainer").resize();
}
Also if I remove the display=none then the tabcontainer appears fine. So is these something wrong with my function call.
ok sorry guys....all my fault here...I forgot to remove the added code I had in my html in my asp.net code
<body class="claro">
<form id="form1" runat="server">
<asp:ScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ScriptManager>
Once I removed the form and scriptmanager lines it works fine..Thanks for everyones efforts.
Just worried that if I were to incorporate ajax and other controls, then would dojo still work

Cannot Add User Control to AJAX Toolkit TabContainer

I have a user control called "Request" that I am able to display outside of a TabContainer on my SharePoint 2010 application page. So the following works:
<UserControl:Request ID="Request1" runat="server" />
<Ajax:TabContainer ID="TabContainer1" runat="server" ScrollBars="None" Enabled="true">
<Ajax:TabPanel ID="TabPanel1" runat="server" HeaderText="Request">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="Label">Mylabel</asp:Label>
</ContentTemplate>
</Ajax:TabPanel>
</Ajax:TabContainer>
However, if I merely move the UserControl line into the ContentTemplate section, replacing the existing Label control, the page bombs out with a runtime error and "Request failed".
The workaround for me was to COPY, not MOVE, the user control into the ContentTemplate section, then give the copy a different ID and set the original (which I don't need) to visible="false". I have no idea why this works and it looks like a bug to me. If anyone can explain it, please do so...

Launching a Radwindow in IE 6 causes all dropdowns to hide

When launching a modal radwindow in IE 6, any dropdown's visible on the parent page are hidden. Once they are hidden, they are gone even after the modal has been closed. These are pure ASP.NET dropdownlists. There is nothing special about the dropdown's that are hidden - I can add new dropdowns to the page with nothing in them, and they still go away on launch. Any ideas out there?
I am using ASP.NET 3.5, 2009 Q3 of Telerik's ASP.NET AJAX Controls, testing with IE 6 (6.0.2600) on a virtual machine running Windows 2000.
While the issue was initially encountered on a much more complex page, I have created a brand new page, no css, just bare-bones elements, and it still happens in IE 6.
<%# Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits=".WebForm1" %>
<%# Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!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></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<telerik:RadScriptManager ID="manager1" runat="server">
</telerik:RadScriptManager>
<asp:DropDownList ID="ddl1" runat="server">
<asp:ListItem Value="1">Item 1</asp:ListItem>
<asp:ListItem Value="2">Item 2</asp:ListItem>
<asp:ListItem Value="3">Item 2</asp:ListItem>
</asp:DropDownList>
<asp:Button ID="btn1" runat="server" OnClientClick="ShowModal(); return false;" Text="click" />
</div>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" />
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript">
function ShowModal() {
var wnd = radopen('<%=ResolveUrl("~/register.aspx") %>', null);
wnd.set_modal(true);
wnd.center();
wnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Resize);
wnd.show();
return false;
}
</script>
</telerik:RadScriptBlock>
</form>
</body>
</html>
It appears that when showing the radwindow with modal being set to true, the dropdown's visibility attribute is being set to hidden. With modal being set to false, the dropdown is fine...
Thanks
Dan Appleyard
We've talked in Telerik's forum and I just wanted to add the info here as it could be of help for other users:
The problem here is with the logic. With your code you do the following:
open the RadWindow control
set its modal property to true. In this case we are hiding the dropdowns in IE6.
set the behaviors of the control
center the window (I assume you do this to redraw the window after setting its behaviors).
You call the show() method again. Because you are calling show() for a window that is modal, the code that hides the dropdowns is run again - that is the reason for them not being visible after the window is closed.
To avoid the problem, I suggest not to call show() again, but to call the center() method last.
RadWindow explicitly hides the dropdowns in IE6 because prior to IE7, dropdowns and list items were heavyweight objects that were rendered above all DHTML elements on the page, including the modal background of RadWindow. This made possible for users to still use the dropdowns on the parent page even if a modal RadWindow was shown.
To avoid that we disable the dropdowns if the browser is IE7+ and hide them completely if it is IE6.
What version of ASP.NET are you running, and what version of Teleriks Rad Window? I have had a lot of issues with older versions, but their new versions seem to be working great.
I'd test it out on a separate page.
Create a new page with a few DDL's randomly filled
Add a basic rad window control to it - and hook it up so it can be invoked
See if you can recreate the issue. If you can't, then it's most likely something with CSS, JavaScript or the HTML markup.
Edit:
Also remember IE6 has drop down issues. Usually the main issue is the dropdown list is always above every other control, but I wouldn't hold my breath if it's something browser related.

Resources