Showing posts with label textbox. Show all posts
Showing posts with label textbox. Show all posts

Monday, March 26, 2012

ATLAS used in UserControl. DropDownList problem

Hi everybody
I just modified my existing well working UserControl to use ATLAS's PopUp control.
The User Control has a Textbox, a calendar and four DropDownLists for Year, Month, Hour and Minute.
When a user clicks into the textbox, calendar with DDL's popup. If user clicks on a date, then the textbox is populated with new date.
But I do have problems when the user clicks on a DropDownList. As soon as the DropDownList opens and mouse is moved on it's items to select a new value, the panel containing Calendar and DDL's disappears.
It looks like the Atlas PopUp Control assumes that the focus was moved outside the control, But in reality the DropDownList is a part of the PopUp control.
How can I fix this?

Thanks in advance
Raja

I have the same problem using the Collapsable Panel with loading controls dynamically in the .aspx Page_Load event. When I Reorder the list, using the ReorderList control, the dynamically loaded controls disappeared.

It sounds like you're running into a general ASP.NET pattern - if you're dynamically adding controls, you'll need to re-add them after a postback as well.


My user control does not contain any dynamic controls and it works very well without ATLAS. I just think that ATLAS assumes the opened DropDownList itema as a new layer and so it thinks that the focus was moved from it's own PopUp panel and simply disappears.

Raja


Hi Raja,

I think your problem has to do with the way thePopupControlExtender handles theblur andfocus events. If you check out the code inPopupControlBehavior.js you'll probably see where things are going wrong. The good news is that we're looking at a better way of doing this and hope to release it in the next drop. For your current scenario though, you could modify the JavaScript code to only hide the popup when something outside it or the textbox is clicked.

Thanks,
Ted


I'm seeing the same problem in HoverExtender. The behavior that I see is that if the Panel's that's loaded is larger and outside of the region of hte target control ... then depending on where you click on the panel, you get diffeerent behaviors.

If I click on the DropDownList and navigate with the keyboard, the panel stays up.
If I click on the DropDownList and click on an item it goes way.

If I change the markup (in my case I'm dynamically generating within a template ... that's another story) to instead use a collection of RadioButtons, the panel is not dismissed.

--

In another panel I've got an embedded controller (the FlashPlayer). I've configured the flash player to not autostart (play=0). The only way to start playing is to click right. Doing so dismisses the hover panel.

Hi pstanhope,

I'm not able to reproduce this problem. Could you post a complete sample the demonstrates it? That would help a lot.

Thanks,
Ted

Atlas UpdatePanel

I have several textboxes, a gridview and an image in a panel that need to be updated based upon info entered into a textbox. Everything works like a champ when I don't use the Atlas UpdatePanel, but I can't seem to figure out how to get even one section to work. Initially I had all 3 areas wrapped into the UpdatePanel and now I'm just trying to update some textboxes with info returned from the server. Neither one works. I tried the PostBackTrigger and AsynchPostBackTrigger. Can anyone tell me what I'm doing wrong?

<asp:UpdatePanel ID="up" runat="server" UpdateMode="Conditional" >
<ContentTemplate>

<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="width:125px" align="right" class="smalltext"><asp:Label ID="lblAccount" AssociatedControlID="txtAccount" runat="server">Account #: </asp:Label></td>
<td class="smalltext" style="width:175px">
<asp:TextBox ID="txtAccount" OnTextChanged="txtAccount_TextChanged" MaxLength="16" runat="server" CssClass="textbox"></asp:TextBox>
<img src="http://pics.10026.com/?src=Images/merge.gif" style="vertical-align:text-bottom" alt="Grab customer info from CSG" onclick="getCustomerInfo()" />

</td>
<td rowspan="2" style="width:70px">
<asp:Panel runat="server" ID="pnlPrevEntries">
<a href="http://links.10026.com/?link=javascript: void(0)" onclick="overlay('caution', 'PrevEntries', 'right')"><img src='Images/caution.png' id='caution' /></a>
</asp:Panel>
</td>
<td style="text-align:center" valign="top" class="smalltext">
<span id="Fullname"><%=Session("Fullname")%></span><span id="extension" style="display:none"><%=Session("extension") %></span><br /><%=Session("Role")%>
</td>
</tr>
<tr>
<td align="right" class="smalltext"><asp:Label ID="lblName" AssociatedControlID="txtName" runat="server">Name (Last, First): </asp:Label></td>
<td>
<asp:TextBox ID="txtName" MaxLength="100" runat="server" CssClass="textbox"></asp:TextBox><!--<input type="text" ID="txtName" MaxLength="100" Class="textbox">-->
<div id="customerInfo">
<asp:TextBox id="txtAddr1" runat="server"></asp:TextBox>
<asp:TextBox id="txtAddr2" runat="server"></asp:TextBox>
<asp:TextBox id="txtCity" runat="server"></asp:TextBox>
<asp:TextBox id="txtState" runat="server"></asp:TextBox>
<asp:TextBox id="txtZip" runat="server"></asp:TextBox>
<asp:TextBox id="txtPhone" runat="server"></asp:TextBox>
<asp:TextBox id="txtRetentionId" runat="server"></asp:TextBox>
<asp:TextBox ID="txtLobChanged" runat="server"></asp:TextBox>
<asp:TextBox ID="txtComments" runat="server"></asp:TextBox>
<asp:TextBox ID="txtPkgID" runat="server"></asp:TextBox>
<asp:TextBox ID="txtReasons" runat="server"></asp:TextBox>
<asp:TextBox ID="txtUncontrollable" runat="server"></asp:TextBox>
<asp:TextBox ID="txtTechProbs" runat="server"></asp:TextBox>
<asp:TextBox ID="txtComps" runat="server"></asp:TextBox>
</div>
</td>
</tr>
</table>
<!-- GridView for previous entries -->
<div id="PrevEntries">
<asp:GridView ID="grdPrevEntries" runat="server"
DataKeyNames="retentionId"
AutoGenerateColumns="False"
CssClass="smGridview"
GridLines="both"
CellPadding="3">
<Columns>
<asp:TemplateField >
<ItemTemplate>
<a href="http://links.10026.com/?link=http://forums.asp.net/AddPost.aspx?ForumID=1007#" id="<%# Eval("retentionId") %>" onclick="selectPrevEntry('<%# Eval("retentionId") %>')">SELECT</a>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="tDate" HeaderText="DATE" DataFormatString="{0:MM/dd/yy}" HtmlEncode="False" />
<asp:BoundField DataField="lob" HeaderText="LOB" />
<asp:BoundField DataField="subreq" HeaderText="SUBREQ" ControlStyle-CssClass="hidden" ItemStyle-CssClass="hidden" HeaderStyle-CssClass="hidden" FooterStyle-CssClass="hidden" />
<asp:BoundField DataField="reason" ControlStyle-CssClass="hidden" ItemStyle-CssClass="hidden" HeaderStyle-CssClass="hidden" FooterStyle-CssClass="hidden" />
<asp:BoundField DataField="inPkg" ControlStyle-CssClass="hidden" ItemStyle-CssClass="hidden" HeaderStyle-CssClass="hidden" FooterStyle-CssClass="hidden" />
<asp:BoundField DataField="outPkg" ControlStyle-CssClass="hidden" ItemStyle-CssClass="hidden" HeaderStyle-CssClass="hidden" FooterStyle-CssClass="hidden" />
<asp:BoundField DataField="offer" ControlStyle-CssClass="hidden" ItemStyle-CssClass="hidden" HeaderStyle-CssClass="hidden" FooterStyle-CssClass="hidden" />
<asp:BoundField DataField="comments" ControlStyle-CssClass="hidden" ItemStyle-CssClass="hidden" HeaderStyle-CssClass="hidden" FooterStyle-CssClass="hidden" />
</Columns>

</asp:GridView>
<p style="text-align:right; margin:20px 3px 3px 0"><a href="http://links.10026.com/?link="#" onclick="overlayclose('PrevEntries');return false"> CLOSE</a></p>
</div> </ContentTemplate>
<Triggers><asp:AsyncPostBackTrigger
<asp:PostBackTrigger ControlID="txtAccount" />

</Triggers>

</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="prgPrevEntries">
<ProgressTemplate>
<img src="http://pics.10026.com/?src=Images/xsmloading.gif" alt="Loading" />
</ProgressTemplate>
</asp:UpdateProgress>


One simple thing I can see is that you don't need the triggers since the textbox that's firing the event is actually in the UpdatePanel (you don't need the triggers section at all... triggers are used mainly to handle situations where you want an external control's postback to cause Ajax Postbacks.

Use of javascript is sometimes something to worry about (but usually things fail with javascript that is simply written to the form to execute inline (and not attached to an event)... I don't see anything like that, so my guess is the triggers section.


BTW, you do have a ScriptManager on the form, right? That's the most common error... ScriptManager with EnablePartialRendering="true" it should look like this

<asp:ScriptManager id="sm1" runat="server" EnablePartialRendering="true" />

Jay Kimble
-- The Dev Theologian
-- http://codebetter.com/blogs/jay.kimble/

Saturday, March 24, 2012

ATLAS ToolKit problem

Hi,

I am using watermark textbox in my application but it gives javascript error while execution.

What should be the problem ?

Please help me.

Thank You,
Bhavin Gajjar

I give you an example about how to use watermark textbox.Wish this will help you.You can post your javascript error messages and your code here.I suggest you to do web application development using asp.net 2.0.There are many new features in asp.net which are convenient to do WAD.

<atlas:ScriptManager id="ScriptManager1" EnablePartialRendering="true" runat="Server"></atlas:ScriptManager>

<atlas:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
First name:
<asp:TextBox ID="TextBox1" CssClass="unwatermarked" Width="150" runat="server"></asp:TextBox>
<br />
Last name:
<asp:TextBox ID="TextBox2" CssClass="unwatermarked" Width="150" runat="server"></asp:TextBox>
<br />
<br />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Submit" />
<br />
<br />
<asp:Label ID="Label1" runat="server"></asp:Label>
</ContentTemplate>
</atlas:UpdatePanel>

<atlasToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server">
<atlasToolkit:TextBoxWatermarkProperties TargetControlID="TextBox1" WatermarkText="Type First Name Here" WatermarkCssClass="watermarked" />
<atlasToolkit:TextBoxWatermarkProperties TargetControlID="TextBox2" WatermarkText="Type Last Name Here" WatermarkCssClass="watermarked" />
</atlasToolkit:TextBoxWatermarkExtender>


Hi,

Thank you for update still not get solution.

Below is HTML script.

<%@.PageLanguage="C#"AutoEventWireup="true"CodeFile="PostTopic.aspx.cs"ValidateRequest="false"Inherits="PostTopic" %>
<%@.RegisterAssembly="AtlasControlToolkit"Namespace="AtlasControlToolkit"TagPrefix="cc1" %>
<%@.RegisterAssembly="FredCK.FCKeditorV2"Namespace="FredCK.FCKeditorV2"TagPrefix="FCKeditorV2" %>
<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml">
<headrunat="server">
<title>Demo Water mark</title><linkhref="StyleSheet.css"rel="stylesheet"type="text/css"/>
</head>

<body><formid="form1"runat="server"><div>

<atlas:ScriptManagerID="ScriptManager1"EnablePartialRendering="true"runat="server"></atlas:ScriptManager>

<tableborder=0align=centerwidth="80%"cellpadding=0cellspacing=0><tbody><tr><td>

Topic Heading :

<atlas:UpdatePanelID="UpdatePanel1"runat="server">
<ContentTemplate>
<asp:TextBoxID="TextBox1"CssClass="unwatermarked"runat="server"></asp:TextBox>
</ContentTemplate>
</atlas:UpdatePanel>

<cc1:TextBoxWatermarkExtenderID="TextBoxWatermarkExtender1"runat="server">
<cc1:TextBoxWatermarkPropertiesTargetControlID="TextBox1"WatermarkText="Bhavin"WatermarkCssClass="watermarked"/>
</cc1:TextBoxWatermarkExtender>

</td>

</tr>

<tr>

<td>

Content : <BR>

<fckeditorv2:fckeditorid="FCKeditor2"runat="server"BasePath="FCKeditor/"></fckeditorv2:fckeditor>

</td></tr><tr><td>
<asp:ButtonID="btnSubmit"runat="server"Font-Bold="True"Text="Submit"/> <asp:ButtonID="btnCancel"runat="server"Font-Bold="True"Text="Cancel"/>
</td></tr><tr><td> </td></tr><tr><td>Topic Posted:</td></tr><tr><td><asp:LabelID="lblComment"runat="server"></asp:Label>
</td></tr></tbody></table></div></form></body>
</html>

===========

This is my code n Other things are working only script i get is " }" missing but then i tried to compile but got getting.
Next i enter text to text box n it prompt error like "Sys" is undefined.

What is wrong.

Help me.

Thank you.


Hi Bhavin,

If you're seeing "Sys" is undefined, then there's a problem loading your "Atlas" scripts. Can you get any other "Atlas" related pages in your project to work? Also, have you modified the TextboxWatermarkBehavior.js file in anyway that could cause an error?

Thanks,
Ted

Hi,

i have only 1 page in my project as i was testing ATLAS first time.

The script i sent you is what i am having on my page and i have not changed any thing in script files.

Thank you.


Hi Bhavin,

Then my guess would be that you created a regular ASP.NET site instead of an "Atlas" site which could explain why the "Atlas" scripts aren't getting loaded. Perhaps you could try creating a new project and follow along with theSetup Your Environment andUsing a Sample Extender Walkthroughs.

Thanks,
Ted

Atlas to AJAX migration woes

I have quite a bit of client side code that uses the Sys.UI namespace. Where is Sys.UI.TextBox and Sys.UI.Select? I read a document a few months ago about these being moved, but for the life of me I can not lacate them.

this.orgTextEditBox =new Sys.UI.TextBox( $('<%= this.orgInfoValue.ClientID %>' ) );
this.orgTextEditBox.initialize();

Now this code will not work, what do I need to do to get back ontrack?

Thanks, Bill

I realized that I had not installed the Jan Features CTP, so with that and a change to the following, I have it working

this.orgTextEditBox =new Sys.Preview.UI.TextBox( $get('<%= this.orgInfoValue.ClientID %>' ) );
this.orgTextEditBox.initialize();

Now for a Select option box aka dropdown, it is working, however, the set_enabled() isn't working.I have
the following dataLst.set_enabled(bOption), so it looks like I need to do something else.

Any ideas?

Atlas TextBox with 2 column ListView as Completion suggestions

Anybody know how to implement this? When implementing autocompletion I need to display more info on the code that the enduser is typing. So instead of the list I get out of the box when trying autocompletion, I was thinking of implementing a mulicolumn listview ( or something similar).
Anybody know how to do this?
Borge3000

For now, you would have to write your own AutoComplete behavior, orperhaps extend the current one. Perhaps if lots of people areinterested in such a behavior, I could put it together sometime for you.

I would very much like this. Maybe you could outline what to to to make this myself?

atlas textBox in to a update panel

hi i have this update panel, but it isn′t workig, adn i don′t know why, me by is becouse the attributes, tha i put on the textbox,

please i need help

Thanks

<%

@dotnet.itags.org.PageLanguage="C#"AutoEventWireup="true"CodeFile="Borrar1.aspx.cs"Inherits="Borrar_Borrar1" %>

<!

DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<

htmlxmlns="http://www.w3.org/1999/xhtml">

<

headrunat="server"><title>Untitled Page</title>

</

head>

<

scriptlanguage="javascript"type="text/javascript">

<!--<![CDATA[

function intOnly(i)

{

if(i.value.length > 0)

{

i.value = i.value.replace(/[^\d]+/g,

'');

}

}

]]>-->

</

script>

<

body><formid="form1"runat="server"><atlas:ScriptManagerID="ScriptManager1"runat="server"></atlas:ScriptManager><div><atlas:UpdatePanelID="CountryCode"runat="server"RenderMode="Inline"><ContentTemplate><asp:TextBoxID="NumericCountryCode"runat="server"AutoPostBack="True"Columns="3"CssClass="textbox"MaxLength="3"OnTextChanged="NumericCountryCode_TextChanged"></asp:TextBox><spanid="CountryName"class="textbox"></span><asp:LabelID="lbCountryName"runat="server"CssClass="labelCountryFound"></asp:Label></ContentTemplate><Triggers><atlas:ControlEventTriggerControlID="ddBusiness"EventName="SelectedIndexChanged"/></Triggers></atlas:UpdatePanel></div><asp:DropDownListID="DropDownList1"runat="server"></asp:DropDownList></form>

</

body>

</

html>

using

System;

using

System.Data;

using

System.Configuration;

using

System.Collections;

using

System.Web;

using

System.Web.Security;

using

System.Web.UI;

using

System.Web.UI.WebControls;

using

System.Web.UI.WebControls.WebParts;

using

System.Web.UI.HtmlControls;

public

partialclassBorrar_Borrar1 : System.Web.UI.Page

{

protectedvoid Page_Load(object sender,EventArgs e)

{

*NumericCountryCode.Attributes.Add(

"onChange","intOnly(this);");

NumericCountryCode.Attributes.Add(

"onkeypress","intOnly(this);");

NumericCountryCode.Attributes.Add(

"onkeyup","intOnly(this);");

}

protectedvoid NumericCountryCode_TextChanged(object sender,EventArgs e)

{

lbCountryName.Text =

"Funciono atlas";

}

}

Hi,

By seeing your code, I could understand the atlas Script Manager tag missing an attribute "EnablePartialRendering".Include this attribute and set the value to true and try running. May be it work.

Regards,


I all ready tried EnablePartialRendering ="true", but it dosn′t work eather.


Please, i realy need help fixing this bug,

Thanks


hello.

not sure on what you want...if you want to cause a partial postback when the value of the textbox changem then you have to set the enablepartialrendering to true (scriptmanager) and set the autopostback to true (in the textbox).


Hello, what i am trying, is when de dropdown list change, cause a partial postback, seting the label = "lbCountryName".

i thik its because the atributes, i am, seting on the page load event on the control,
but if it true, then i can not set javascript atributes, to the controls when they are in the update panel?


hello again.

well, then set the autopostback to true on the dropdown (and, of course, set the enablepartialrendering to true too).

Atlas TextBox

Hi,
Just tried the textbox sample from HOL and realized if we have a HTML SELECT element under the auto-completed result list, the SELECT element will show through it.
I know this is a browser issue but as there are several AJAX toolkits around these days, do you expect to have a solution for this problem by RTM time?
Thank you,
António CruzYes, you're absolutely right. That's a very well known problem on IE browsers. It's something we already had to deal with in the ASP.NET 2.0 menu control but that we didn't have time to fix in the PDC Atlas build. Here's a blog post explaining how it was fixed in ASP.NET 2.0:
http://weblogs.asp.net/bleroy/archive/2005/08/09/422047.aspx
We're probably going to apply the same fix in a future build of Atlas right in the popup control.
The same fix will cover flash and other active content, in IE, however in firefox if there is movment, on your active content it will redraw the active content over the covered area untill you cause the document to redraw. ie: alt - tabing back and forth.
can anyone say annoying :)
Just a heads up.
-Adam
I'm not sure I understand thar: Firefox does not need this fix as it already covers selects and other similar contents.

Wednesday, March 21, 2012

Atlas Problem,please help

i 've installed Atlas.when i try to use any extender, for ex: Button or TextBox ,and then takes the properties of Textbox or button, there comes the Option of Extender, but when i click on Plus button to extend those option, there dsnt come any other option , ie that plus dsnt expand, whats d reazn,pls help methanxIn my experience, you have to actually set the options for the extender in the source view of the page, rather than on the design surface. You may want to give that a shot.
no, i have seen a video tutorial d/l from asp.net in that video,they have not done anything in code view, just dragged the extender and from property view ,sets the option of control. but in my controls property extender name appers but not the list of options
no, i have seen a video tutorial d/l from asp.net in that video,they have not done anything in code view, just dragged the extender and from property view ,sets the option of control. but in my controls property extender name appers but not the list of options