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
1 comment:
https://guyfromvnr.blogspot.in/2016/07/atlas-toolkit-throwing-unknown-error.html
Post a Comment