Mask is not working for dynamic textbox in Mojoportal

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
12/20/2012 10:50:51 PM
Gravatar
Total Posts 18

Mask is not working for dynamic textbox in Mojoportal

Hello Joe,

This is the code which I am using for mask for dynamically created textbox for cellphone.The following script is working when I used for a seperate aspx page but when I used this with mojoportal it's not working.Please help me for this to work.


                            TextBox txt = new TextBox();
                            txt.ID = "txt_CellPhone";                        
                            txt.CssClass = "width-310";
                            txt.Visible = true;
                            txt.Attributes.Add("runat", "server");
                           
                            newcell = new TableCell();
                            newRow.Cells.Add(newcell);
                            newcell.Controls.Add(txt);
                            DynamicControlsHolder.Controls.Add(txt);
                            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "CellPhoneMask",
                               "<script src=\"Script/jquery-1.7.1.js\" type=\"text/javascript\"></script>" +
                               "<script src=\"Script/JScript-Mask.js\" type=\"text/javascript\"></script>" +
                               "<script src=\"Script/JScript-MaskFunction.js\" type=\"text/javascript\"></script>" +
                               <script type='text/javascript'>" +
                               "jQuery(function ($) {" + "$('#<%=txt_CellPhone.ClientID%>').mask('(999) 999-9999') });</script>", false);

 


                               

12/21/2012 6:00:36 AM
Gravatar
Total Posts 18439

Re: Mask is not working for dynamic textbox in Mojoportal

You should not load the main jquery script since mojoPortal already loads both jquery and jquery ui. Loading a second copy of jquery may be the cause of the problem. Other than that you need to test it in a non mobile browser where you can use browser tools to look for script errors.

Hope that helps,

Joe

12/21/2012 7:11:21 AM
Gravatar
Total Posts 18

Re: Mask is not working for dynamic textbox in Mojoportal

Thanks for your reply

You must sign in to post in the forums. This thread is closed to new posts.