AJAX :: When Showing The Second DIV The JavaScript Inside The Second DIV Is Not Working?
Dec 30, 2010
I have a user control.The User control contains many DIV tags. Each DIv contains update panel and javacript.At a time only one DIV is visible.
Visibility is handled in c# code behind. Show the second DIV by clicking on a button in first DIV.The user control is in another update panel.
When showing the second DIV the JavaScript inside the second DIV is not working.
View 2 Replies
Similar Messages:
Mar 12, 2010
I have a problem that when i bring the array of asp and use it in the javascript, When i use the counter (i++) and print for each index of array just like "<%=app[i] %>" and it is not return the value back to me.i solve this problem for a dayedit
<%
String[] asp = {"a","b","c"};
%>
[code]...
View 1 Replies
Dec 6, 2010
Explaination in detail I have a tree view control on left of my page and AjaxToolkit:TabContainer on the right,consisting of 9 tabs in it (I have developed individual controls and added to the tab panels). On selecting a value from the tree view control the I am refreshing the values inside all the tab panels. There is a method reload written on all the controls which are called on tree view click which sets the value of the selected tree item in properties in all the controls and also refreshs them. Its a big performance issue for sure which i need to improve on but that would come later.
My problem
1. In the Main tab (ascx control) consists of asp:chart control which I am populating and it also consists of 2 buttons in which ModalPopupExtender would open up another 2 controls on button click within this control. Now on the tree view click I am calling
the reload of Main Tab which internally called the reload function of these 2 controls also
On Tree view click
Maintab.reload
{
ModalPopupExtender1.reload
ModalPopupExtender2.reload
}
Secondtab.reload
Thirdtab.reload
If I populate the asp.chartcontrol without reloading the ModalPopupExtender1.reload ModalPopupExtender2.reload it works great but when I call both ModalPopupExtender1.reload
ModalPopupExtender2.reload it shows up and goes away.
Any thing i am missing on ? How to make chart control stay on the page and not vanish. I tried making it visible again. The main page contains a chart control which comes and goes away and does not stay only if i comment out the reloading of these usercontrols it stays visible with values on the main page else goes away.
2.Performance problem- I am not sure how to lazy load the content inside the tab panels so that controls should have the selected item for tree view click and can populate thereon.
3. This is how I call my user controls to reload on the treeview click from within the main page.
PEGeneralInfoPortfolioProfiler1.PortfolioCode = strPortfolioCode;
PEGeneralInfoPortfolioProfiler1.ReloadControl(1);
View 2 Replies
Dec 28, 2010
how to setting the targetcontrolId and showing the popupextender in javascript by using popupextender behaviourId or its serverId?
View 2 Replies
Jan 8, 2010
I have put my gridView inside an UpdatePanel with Timer control for auto refresh.The gridView has a linkButton column which is bounded to referenceNo column from database.
On click of this link button i want a panel to get visible. This Panel contains details corresponding to the referenceNo shown in differnt controls (mostly texboxes). Do i necessarily need to put the panel inside the Update Panel.If not how do i do it?
I have tried putting panel outside UpdatePanel, but it doesn't show panel on clicking the linkbutton nor does the values are updated inside this panel (if panel's visibility is set to true by default for testing purpose).
View 4 Replies
Jan 27, 2011
i have a javascript color picker i can get it working fine in a aspx page, but i am unable to get it working in a usercontrol inside a update panel. I have tried using the following but i still cannot get it to workm the js file can be viewed at [URL]
ScriptManager.RegisterClientScriptInclude(this, this.GetType(), "colorpicker_1", "/_template/js/colorpicker/jscolor.js");
View 10 Replies
Jun 18, 2010
I have a user control SearchCriteriaCtrlr.ascx(see below).In this user control, I have a javascript code for filtering listbox values.I am firing this javascript for
<asp:TextBox ID="txtSearch" runat="server" onkeyup="FilterItems(this.value)"></asp:TextBox>
Problem:The problem is, my filter javascript is not working
SearchCriteriaCtrlr.ascx
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SearchCriteriaCtrlr.ascx.cs"
Inherits="TimecardAdmin.SearchCriteriaCtrlr" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<link href="Styles/Site.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
//variables for holding different values
var ddlText, ddlValue, ddl, lblMesg;
function CacheItems()
{
//Array for holding Text
ddlText = new Array();
//Array for holding Value
ddlValue = new Array();
//Listbox value
ddl = document.getElementById("<%=lstSource.ClientID %>");
//Looping through all values of listbox
for (var i = 0; i < ddl.options.length; i++)
{
ddlText[ddlText.length] = ddl.options[i].text;
ddlValue[ddlValue.length] = ddl.options[i].value;
}
}
window.onload = CacheItems;
//function for filtering items
function FilterItems(value)
{
ddl.options.length = 0;.....................
View 1 Replies
Mar 19, 2010
I'm using the following function (found on this forum) to display a popup control from the server-side:
on the server:
ScriptManager.RegisterStartupScript(this, GetType(), "userInfoPopScript",
string.Format("showPopup('{0}', 2);", targetControlClientId)
, true);
on the client:
[code]....
this works great for explorer 8 , firefox, chrome but on explorer 7 my page just jumps to the left and doesn't show the popup at all.
If I remove the set__parentElementID call, then the popup is displayed but in the wrong position (of course).
View 2 Replies
Jun 22, 2010
I have a listview that is showing its result by using a linq query. The linq query goes like this.
[Code]....
* db.Varer: Varer is a table that contains basic product information like proudct name, product nr. etc. ** a.fk_kategori_id == CatParamId : I'm just saying limit the result according to the Category ID (a.fk_kategori_id). The category id is coming from a dropdownlist (CatParamID) *** Join: Besides the Varer (Product) table I also have another table, Sizes. This Sizes table contains 6 columns (ID_Sizes (int) primary key and the columns: OneSize, S, M, L, XL, XXL all are bit (true or false)). There is a relationship between Varer table and Sizes table. It says that I can only insert a value into the "fk_sizes_id - column" of varer table if that value already exists as primary key within the Sizes table. **** I'm starting by picking basic product values like productId, ProductName etc from the Varer (a) table ***** Then I'm picking the corresponding Sizes values (onesize, s, m, ...) from the Sizes table. Now within my ListView I'm showing the above result by using Eval, like this.
[Code]....
And this works perfectly, but now comes the thing that is causing me trouble. I have the below drop down list (still within the ListView ItemTemplate):
[Code]....
I want this drop down list to be populated with only those of the "linq query's Sizes table result" that are true. By "Sizes table result" I mean these
[Code]....
View 14 Replies
Jul 25, 2010
I have a FormView inside a user control, and in the InsertItemTemplate, I have an AsyncFileUpload control, that I would like to to use. On the user side, it seems to work, but it doesn't work on the server side code behind. The HasFile Property is always false, and it doesn't fire the UploadCompleted event either. My UpdatePanel is in the master page.
<asp:FormView
ID="frmAddImage"
runat="server"
DataKeyNames="imageID"
DataSourceID="sqlImages"
Width="100%">
<InsertItemTemplate>
<cc1:AsyncFileUpload
runat="server"
ID="FileUploadImage"
Width="400px"
UploaderStyle="Traditional"
CompleteBackColor="Lime"
ErrorBackColor="Red"
onuploadedcomplete="AsyncFileUpload_UploadedComplete"
UploadingBackColor="#CCFFFF"
/>
View 6 Replies
Mar 31, 2010
The following is not working (does a full postback). Note: HTML tags inside updatepanel. We can' t have HTML tags inside updatepanel? If so, what's the work around?
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<td><asp:DropDownList ID="ddlDEPT_ID" runat="server" AutoPostBack="true"></asp:DropDownList></td>
<td><asp:Label ID="Label5" runat="server" Text="Sub-Department:"></asp:Label></td>
<td><asp:DropDownList ID="ddlSUB_DEPT_ID" runat="server"></asp:DropDownList></td>
</ContentTemplate>
</asp:UpdatePanel>
The following works fine. AJAX in action.
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:DropDownList ID="ddlDEPT_ID" runat="server" Width="200px" AutoPostBack="true"></asp:DropDownList>
<asp:Label ID="Label5" runat="server" Text="Sub-Department:"></asp:Label>
<asp:DropDownList ID="ddlSUB_DEPT_ID" runat="server" Width="200px"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
View 3 Replies
Jun 16, 2015
ajax AutoCompleteExtender not working in user control (.ascx) but when use directly on aspx page its working perfectly.
<asp:TextBox ID="txtSearchProject" runat="server" CssClass="input col-lg-4" type="text" placeholder="Type Location or Project/Society or Keyword"></asp:TextBox>
<cc1:AutoCompleteExtender ID = "Act_SearchProject" runat = "server" TargetControlID = "txtSearchProject" MinimumPrefixLength="1" EnableCaching="true" CompletionSetCount="1" CompletionInterval="100" ServiceMethod="GetLocality_Project" >
[Code].....
View 1 Replies
Feb 23, 2010
I have populated my data using DataRepeater Control and i have a Delete button on that so each and every row has a delete button which allows user to delete a single entry from DB. I have put this control inside UpdatePanel so i can avoid full page postback.
When i delete the row from the database and try to show a alert message using Repsonse.Write it throws me the below error message
Error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled. Details: Error parsing near 'itle||Untitled Page|<script language='ja'. Source File: [URL]
But, If i remove my update panel its coming up well, is there any solution so i can show alert box after a row been deleted ?
View 8 Replies
Feb 2, 2011
Really the title explains it. When i have an HTML Editor (from the AJAX Control Toolkit) inside an UpdatePanel, i get the error message: "Microsoft JScript runtime error: Invalid set operation on read-only property"
I was looking online and it appears it's because the editor uses javascript - is there any workaround for this?
My markup is pretty straight forward:
<%@
Page
Title=""
Language="VB"
MasterPageFile="~/Site.master"
AutoEventWireup="false"
CodeFile="post.aspx.vb"
Inherits="post"
%>
<%@
Register
Assembly="AjaxControlToolkit"
Namespace="AjaxControlToolkit"
TagPrefix="asp"
%>
<%@
Register
assembly="AjaxControlToolkit"
namespace="AjaxControlToolkit.HTMLEditor"
tagprefix="cc1"
%>
<asp:Content
ID="Content1"
ContentPlaceHolderID="HeadContent"
Runat="Server">
<link
rel="stylesheet"
href="../Styles/post.css"
/>
</asp:Content>
<asp:Content
ID="Content2"
ContentPlaceHolderID="MainContent"
Runat="Server">
<table
style="width:100%"><tr><td
valign="top"
style="text-align:left"><asp:Label
ID="forumNav"
runat="server"
Text="Label"
Font-Names="Calibri"
Font-Size="Small"
ForeColor="#333333"></asp:Label></td><td
valign="top"
style="text-align:right;"><asp:Hyperlink
ID="replyButton"
NavigateUrl="reply.aspx?postID="
runat="server"
Text="Reply"
CssClass="replyButton"></asp:HyperLink></td></tr></table>
<asp:Panel
ID="postContent"
runat="server">
</asp:Panel>
<asp:UpdatePanel
ID="ReplyPanel"
runat="server"
ChildrenAsTriggers="false"
UpdateMode="Conditional">
<ContentTemplate>
<center>
<asp:Label
ID="Label1"
runat="server"
Text=""></asp:Label>
</center>
<br
/>
<asp:Panel
ID="Panel1"
runat="server">
Reply:
<cc1:Editor
ID="Editor1"
runat="server"
/>
<center>
<asp:Button
ID="Button1"
runat="server"
Text="Post
Reply"
/>
</center>
</asp:Panel>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger
ControlID="Button1"
EventName="Click"
/>
</Triggers>
</asp:UpdatePanel>
<asp:UpdateProgress
ID="ReplyProgress"
runat="server"
AssociatedUpdatePanelID="ReplyPanel"
>
<ProgressTemplate>
<center>
<asp:Image
ID="loading"
runat="server"
ImageUrl="~/Images/ajax-loader
(1).gif"/>
Sending reply...</center>
</ProgressTemplate>
</asp:UpdateProgress>
</asp:Content>
View 2 Replies
Oct 1, 2010
overflow auto not working inside updatepanel
View 3 Replies
Nov 11, 2010
if click any button example command and type the autocomplete search is not working
below the code iam sending herewith,how to over come this problem
when i make autopost back true then autocomplete search not workin
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="stdreferencemaster.aspx.cs" Inherits="stdreferencemaster" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!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 id="Head1" runat="server">
<title>Untitled Page</title>
<style type="text/css">
.TabHeaderCSS
{
margin-right: 20px;
font-family:Verdana, Arial, Courier New;
font-size: 16px;
background-color:#FFFFC0 ;
text-align: left;
cursor: pointer;
border:10px;
padding:10px;
margin:20px;
spacing:30px;
}
.my
{
padding:40px;
margin:10;
}
</style>
<link rel="Stylesheet" type="text/css" href="formstyle.css" />
<link rel="stylesheet" href="jquery.autocomplete.css" type="text/css" />
<script type="text/javascript" src="script/jquery-1.4.2.js"></script>
<script type="text/javascript" src="script/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="jquery.autocomplete.js"></script>
<script type="text/javascript">
function MoveTab(num)
{
var container = $find('pnrefmaster');
container.set_activeTabIndex(num);
}
</script>
<div id="wrap">
<div id="header">
<table style="width: 936px">
<tr>
<td style="width: 819px">
</td>
<td style="width: 106px">Welcome
</td>
<td style="width: 661px">
View 1 Replies
Jan 19, 2011
Autocompleteextender not working inside an user control tried all ways. i have a custom function.. inside the cs file itself like the following :-
[Code]....
I did something like this and it worked properly when it was in aspx but when i changed all this to ascx and when i added the user control in aspx the autocomplete is not working. say enablecontext = false; i have even tried that.. its not even reaching till that function. moreover i need contextkey to validate different autocomplete controls inside my page.
View 2 Replies
May 7, 2015
I would like support to add a calendar datepicker the tab because when I do it the traditional way the textbox does not show me anything panel.
[URL]
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonalTab.aspx.cs" Inherits="SIS_L1ML.SIS_RRHH.Mantenimientos.PersonalTab" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
[CODE]..
View 1 Replies
Aug 24, 2010
Referring to the following: Ajax Asyncfileupload doesn't work as soon as I put it in a control I am having the same issue. I am not using a Master page though. I have an AsyncFileUpload control in a Panel, within an update panel.
View 1 Replies
Feb 8, 2011
This is Vijay Reddy Chennadi. I have a problem with validation summary, which is not working properly inside a gridview (which is in an updatepanel).
View 4 Replies
Jan 13, 2011
i wnat to show repater inside datalist with CollapsiblePanelExtender but not work. this is my code
[Code]....
View 1 Replies
Feb 21, 2010
Imports System
Imports System.Data
Imports System.Data.OleDb
Imports System.Web
Imports System.Web.UI
Imports System.Xml
Imports System.IO
Imports System.EventArgs
Imports System.Web.UI.HtmlControls
Imports System.Web.UI.WebControls
Protected Sub Page_Load(ByVal
sender As
Object,
ByVal e
As System.EventArgs)
Handles
Me.Load
Dim div1, divana
As
New HtmlGenericControl("div")
Dim lbl
As
New Label
Dim imgbt
As
New ImageButton
Dim acp
As
New AjaxControlToolkit.CollapsiblePanelExtender
Dim aacc
As
New AjaxControlToolkit.Accordion
Dim aap, aap2
As
New AjaxControlToolkit.AccordionPane
Dim cnt
As
New ContentPlaceHolder
Dim pnl
As
New Panel
Dim pnlana
As
New Panel
Dim cssUrl
As
String
Dim cssLink
As
New HtmlLink()
Dim i,n,k,p
As
Integer
Dim bag
As
New OleDbConnection
Dim s
As
String
'stylesheet add
cssUrl = Server.MapPath("daban.ccs")
cssLink.Href = cssUrl
cssLink.Attributes.Add("rel",
"stylesheet")
cssLink.Attributes.Add("type",
"text/css")
Page.Header.Controls.Add(cssLink)
'---------- find content
cnt = DirectCast(Me.Master.FindControl("ContentPlaceHolder1"),
ContentPlaceHolder)
divana.ID = "Divana"
divana.Attributes("Style") =
"padding:20px"
'---- 1. group
div1 = New HtmlGenericControl("div")
div1.ID = "divduyana"
div1.Attributes("Style") =
"padding-bottom:20px;color:#5377A9;font-family:Arial, Sans-Serif;font-weight:bold;font-ize:1.5em;"
lbl = New Label
lbl.ID = "lblana"
lbl.Text ="DUYURULAR..."
div1.Controls.Add(lbl)
divana.Controls.Add(div1)
'-----1 group end
n=3 ' normally it is getting from database
For i = 1
To n
'---- 2 group start
pnl = New Panel
pnl.ID = "Duy" + i.ToString() +
"_1"
pnl.Width = 600
pnl.Height = 30
pnl.HorizontalAlign = HorizontalAlign.Center
'image
div1 = New HtmlGenericControl("div")
div1.ID = "divimg" + i.ToString()
div1.Attributes("Style") =
"float: left; vertical-align: middle;"
imgbt = New ImageButton
imgbt.ID = "imgbt" + i.ToString()
imgbt.ImageUrl = "~/image/expand_blue.jpg"
imgbt.AlternateText = "Detaylari Goster..."
div1.Controls.Add(imgbt)
pnl.Controls.Add(div1)
'label
div1 = New HtmlGenericControl("div")
div1.ID = "divlblduy" + i.ToString()
div1.Attributes("Style") =
"float: left;"
lbl = New Label
lbl.ID = "lblduy" + i.ToString()
lbl.Text = "lbl_text balabala"
lbl.ForeColor = Drawing.Color.Red
div1.Controls.Add(lbl)
pnl.Controls.Add(div1)
' label detay goster
div1 = New HtmlGenericControl("div")
div1.ID = "divlbldet" + i.ToString()
div1.Attributes("Style") =
"float: rigth;"
lbl = New Label
lbl.ID = "lbldet" + i.ToString()
lbl.Text = "(Detaylari Goster...)"
lbl.ForeColor = Drawing.Color.Gray
div1.Controls.Add(lbl)
pnl.Controls.Add(div1)
divana.Controls.Add(pnl)
'----- 2 group end
'----- 3 group start
pnl = New Panel
pnl.ID = "Duy" + i.ToString() +
"_2"
pnl.Width = 600
' accordino
aacc = New AjaxControlToolkit.Accordion
aacc.ID = "Acc" + i.ToString()
k=2 ' normally coming from database
For t = 1
To
k
aap = New AjaxControlToolkit.AccordionPane
aap.ID = "Apane" + i.ToString() +
"_" + t.ToString()
aap.HeaderContainer.Controls.Add(New LiteralControl("anyname"))
aap.ContentContainer.Controls.Add(New LiteralControl("anycontent"))
aacc.Panes.Add(aap)
Next
aacc.HeaderCssClass = "accordionHeader"
aacc.ContentCssClass = "accordionContent"
pnl.Controls.Add(aacc)
acp = New AjaxControlToolkit.CollapsiblePanelExtender
acp.ID = "acp" + i.ToString()
acp.TargetControlID = "Duy" + i.ToString() +
"_2"
acp.ExpandControlID = "Duy" + i.ToString() +
"_1"
acp.CollapseControlID = "Duy" + i.ToString() +
"_1"
acp.Collapsed = True
acp.TextLabelID = "lbldet" + i.ToString()
acp.ImageControlID = "imgbt" + i.ToString()
acp.ExpandedText = "(Detaylari Gizle...)"
acp.CollapsedText = "(Detaylari Goster...)"
acp.ExpandedImage ="~/image/collapse_blue.jpg"
acp.CollapsedImage = "~/image/expand_blue.jpg"
acp.SuppressPostBack = True
'acp.SkinID = "CollapsiblePanelDemo"
cnt.Controls.Add(acp)
div1 = New HtmlGenericControl("div") ' this is just i add
extra
div1.ID = "divara" + i.ToString()
div1.Attributes("Style") =
"float: left;"
divana.Controls.Add(div1)
divana.Controls.Add(pnl)
Next
'----3 group end...
cnt.Controls.Add(divana)
End
Sub
<ASPX code is>
<%@
Page
Language="VB"
MasterPageFile="~/tiyap.master"
AutoEventWireup="false"
CodeFile="duyurular.aspx.vb"
Inherits="duyurular"
title="Untitled Page" %>
<%@
Register
assembly="AjaxControlToolkit"
namespace="AjaxControlToolkit"
tagprefix="ajaxToolkit" %>
<asp:Content
ID="Content1"
runat="server"
contentplaceholderid="ContentPlaceHolder1">
<ajaxToolkit:ToolkitScriptManager
ID="ToolkitScriptManager1"
runat="server">
</ajaxToolkit:ToolkitScriptManager>
</asp:Content>
there is no error...
code is working on mozzila firefox, like what i want
<div>
- collespand 1
-----accordion 1
-------acc pane 1
-------acc pane 2
- collespand 2
-----accordion 2
-------acc pane 3
-------acc pane 4
- collespand 3
-----accordion 3
-------acc pane 5
-------acc pane 6
<div>
but when i run this code inside internet explorer any version ...
result became
- collespan1
---acc 1
------ accpane1
------accpane2
----------collespan2
all going inside collespan1? what is the problem? why firefox is working ok, internet explorer not. it is a bug or i write something wrong
View 6 Replies
Mar 3, 2011
I have put one mask edit extender for a textbox which is inside a Gridview templete field and the MaskType="Number
Mask="99,99,999.99"My problem is described below Commas are not dispalying inside the GRidView.After clicking in the textbox its coming and immediately vanishing.
e.g. after typing it should come like this 34,56,789.00 but its coming like 3456789.00
View 2 Replies
May 7, 2015
I try to clearn asp.net form on cancel button click using String.Empty but it does not seem to be working. Here's my aspx code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddEmployee.aspx.cs" Inherits="AddEmployee" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<!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 id="Head1" runat="server">
[code]....
View 1 Replies
Jun 16, 2015
I am having one button , two date pickers and one report viewer , not all these controls are under update panel. Now when i click on button it is not generating a report. While if i remove update panel then it works.
View 1 Replies