Search Results

Search found 12 results on 1 pages for 'jignesh kheni'.

Page 1/1 | 1 

  • Validating the SharePoint InputFormTextBox / RichText Editor using JavaScript

    - by Jignesh Gangajaliya
    In the previous post I mentioned about manipulating SharePoint PeoplePicker control using JavaScript, in this post I will explain how to validate the InputFormTextBox contol using JavaScript. Here is the nice post by Becky Isserman on why not to use RequiredFieldValdator or InputFormRequiredFieldValidator with InputFormTextbox. function ValidateComments() {     //retrieve the text from rich text editor.     var text = RTE_GetRichEditTextOnly("<%= rteComments.ClientID %>");     if (text != "")     {         return true;     }     else     {         alert('Please enter your comments.');         //set focus back to the rich text editor.         RTE_GiveEditorFocus("<%= rteComments.ClientID %>");         return false;     }     return true; } <SharePoint:InputFormTextBox ID="rteComments" runat="server" RichText="true" RichTextMode="Compatible" Rows="10" TextMode="MultiLine" CausesValidation="true" ></SharePoint:InputFormTextBox> <asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" OnClientClick="return ValidateComments()" CausesValidation="true" /> - Jignesh

    Read the article

  • Using SharePoint PeoplePicker control in custom ASP.NET pages

    - by Jignesh Gangajaliya
    I was developing custom ASP.NET page for a SharePoint project, and the page uses SharePoint PeoplePicker control. I needed to manipulate the control on the client side based on the user inputs. PeoplePicker Picker is a complex control and the difficult bit is that it contains many controls on the page (use the page source viewer to see the HTML tags generated). So getting into the right bit is tricky and also the default JavaScript functions like, control.disabled; control.focus(); will not work with PeoplePicker control. After some trial and error I came up with the solution to manipulate the control using JavaScript.  Here I am posting the JavaScript code snippet to enable/disable the PeoplePicker Control: function ToggleDisabledPeoplePicker(element, isDisabled) {     try     {         element.disabled = isDisabled;     }            catch(exception)     {}            if ((element.childNodes) && (element.childNodes.length > 0))     {         for (var index = 0; index < element.childNodes.length; index++)         {             ToggleDisabledPeoplePicker(element.childNodes[index], isDisabled);         }     } } // to disable the control ToggleDisabledPeoplePicker(document.getElementById("<%=txtMRA.ClientID%>"), true); The script shown below can be used to set focus back to the PeoplePicker control from custom JavaScript validation function: var found = false;         function SetFocusToPeoplePicker(element) {     try     {         if (element.id.lastIndexOf("upLevelDiv") !=-1)         {             element.focus();             found = true;             return;         }     }             catch(exception)     {}             if ((element.childNodes) && (element.childNodes.length > 0))     {         for (var index = 0; index < element.childNodes.length; index++)         {             if (found)             {                 found = false;                 break;             }                      SetFocusToPeoplePicker(element.childNodes[index]);         }     } } - Jignesh

    Read the article

  • Ruby module_function, invoking module's private method, invoked in class method style on module shows error

    - by Jignesh
    test_module.rb module MyModule def module_func_a puts "module_func_a invoked" private_b end module_function :module_func_a private def private_b puts "private_b invoked" end end class MyClass include MyModule def test_module module_func_a end end Invoking module function from class c = MyClass.new c.test_module Output 1: $ ruby test_module.rb module_func_a invoked private_b invoked Invoking module function on module in class method style ma = MyModule.module_func_a Output 2: module_func_a invoked test_module.rb:5:in `module_func_a': undefined local variable or method `private_b' for MyModule:Module (NameError) from test_module.rb:31 As can be seen from the Output 1 and Output 2 when including the module in a class, no issue occurs when a module's private method gets invoked from a module function while in case when directly invoking the module function on the module in class method style the module's private method, invoked from module function, is not found. Can anybody make me understand the reason behind above behavior and whether invoking module function (which in turn invokes module's private method) on module in class method style is possible or not? If possible, then what rectifications are required in my code to do the same? Thanks, Jignesh

    Read the article

  • Problems while upgrading from 11.10 to 12.04

    - by Jignesh
    I was upgrading from ubuntu 11.10 to ubuntu 12.04 using the alternate cd method. Everything went fine upto installing upgrades, but during the cleanup phase , it asked me to remove obselete packages or not, and to close all open applications. I used Alt+Tab to view open applications, and then it just hanged, I could only move mouse ,entire screen got blank, and I was forced to restart , leaving the upgrade in middle. After restarting my ubuntu 12.04 is working fine , I think ubuntu got upgraded as only cleanup and restarting phases were remaining when I restarted, can there be problems with this ubuntu, or is this fine ?

    Read the article

  • add next and previous button in jquery slider

    - by jignesh kheni
    I Made some below script to make simple fadeInOut slideshow. Now I want to add Next/Prv buttton. How can i do it? '$(document).ready(function(e) { var slider ={ init: function() { var initialFadeIn = 1000; var itemInterval = 5000; var fadeOut = 2500; var numberOfItems = $('.slider-img').length; var currentItem = 0; //show first item $('.slider-img').eq(currentItem).fadeIn(initialFadeIn); //loop through the items var infiniteLoop = setInterval(function(){ $('.slider-img').eq(currentItem).fadeOut(fadeOut); if(currentItem == numberOfItems -1){currentItem = 0;} else{currentItem++;} $('.slider-img').eq(currentItem).fadeIn(fadeOut); }, itemInterval); } }; slider.init(); });'

    Read the article

  • ASP.Net FileUpload not working in google chrome

    - by Jignesh
    ASP.Net FileUpload not working in google chrome.It shows validation error,even after choosing right file type.Any solution ? Here is a code : <asp:FileUpload ID="FU1" runat="server" /> <asp:RegularExpressionValidator id="FileUpLoadValidator" runat="server" ErrorMessage="Upload jpg and gif only." ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))(.jpg|.JPG|.gif|.GIF)$" ControlToValidate="FU1"> </asp:RegularExpressionValidator>

    Read the article

  • Excel VSTO ->Hide/Unhide Ribbon Button based on another Ribbon Button click

    - by Jignesh
    We are creating Excel 2007 AddIn using VSTO. Now we have a scenario where in there are 2 buttons. Button 'A' and Button 'B'. Button 'B'needs to be hidden based on the click on the button 'A'. But since the ribbon bar is not getting refreshed dynamically we are unable to see the change on the Ribbon Bar. I heard from some blods we need to use callback methods for the same. Could you please explain and put some code snippet on how to do that ? Will highly appreciate if anyone can help asap ...

    Read the article

  • Clear Session in ASP.Net

    - by Jignesh
    I want to clear the session on Page unload. Here is a condition : If user goes from Page A to Page B of the same site session must not get cleared. If user close the browser window or Tab(close the site),session must gets cleared. I have tried using AJAX PageMethod to call server-side procedure to remove session from client side script.But the procedure is not getting hit,I have checked it using Breakpoint. server side procedure is in master.cs file I will appreciate your help. Here is code in site.master <body onunload="HandleClose();"> <script type="text/javascript"> function HandleClose() { PageMethods.AbandonSessions(); } and here is a code in master.cs : [System.Web.Services.WebMethod] public static void AbandonSessions() { HttpContext.Current.Session.Abandon(); }

    Read the article

  • TextBox value not updated

    - by Jignesh
    I am fetching data from database to textbox using Linq.When i try update the same textbox value,it does not work. DAL.TournamentsDataContext tdc = new SchoolSports.DAL.TournamentsDataContext(); var tournamentTable = tdc.GetTable<DAL.Tournament>(); var tournamentRecord = (from rec in tournamentTable where rec.TournamentId == TournamentId select rec).Single(); tournamentRecord.Tournament_type = Tournament_type; tournamentRecord.Tournament_Name = Tournament_Name; ; tournamentRecord.Tournament_Level = Tournament_Level; tournamentRecord.Tournament_For = Tournament_For; tournamentRecord.Country_Code = Country_Code; tournamentRecord.Tournament_Status = Tournament_Status; tournamentRecord.Tournament_begin_date = Tournament_begin_date; tournamentRecord.Tournament_end_date = Tournament_end_date; tournamentRecord.Sponsored_By = Sponsored_By; tournamentRecord.Tournament_Details = Tournament_Details; var organiserTable = tdc.GetTable<DAL.Organiser>(); var organiserRecord = (from rec in organiserTable where rec.Tournament_Id == TournamentId select rec).Single(); organiserRecord.Name_Of_Organiser = OrName; organiserRecord.Telephone = OrTeleNo; organiserRecord.Email = OrEmail; organiserRecord.Mobile = OrMobile; organiserRecord.Fax = OrFax; if (Tournament_For == "School") { var invitedSchoolIdTable = tdc.GetTable<DAL.Invited_School>(); var invitedSchoolIdRecord = (from rec in invitedSchoolIdTable where rec.Tournament_Id == TournamentId select rec).Single(); invitedSchoolIdRecord.School_Ids = SchoolUniIds; } if (Tournament_For == "University") { var invitedUniversityTable = tdc.GetTable<DAL.Invited_University>(); var invitedUniversityIdRecord = (from rec in invitedUniversityTable where rec.Tournament_Id == TournamentId select rec).Single(); invitedUniversityIdRecord.University_Ids = SchoolUniIds; } tdc.SubmitChanges();

    Read the article

  • Real Time Progress Indicator

    - by jignesh
    I am trying to get the real time progress indicator. In the code snippet below,i am trying to set the width of DIV on the basis of the Number of Items retrieve from the Web Service Call Back Function. for (i = 0; i < data.length; i++) { table += '<tr>'; table += '<td>' + data[i].ItemId + '</td>'; table += '<td></td>'; table += '<td>' + data[i].Name + '</td>'; table += '<td>' + data[i].Unit + '</td>'; table += '<td><input type=text value=' + data[i].Quantity + '></td>'; table += '<td>' + data[i].Brands + '</td>'; table += '<td><img border=0 src=../images/Delete_icon.gif></td>'; table += '</tr>'; $('#divProgressIndicator').width((100 * (i / data.length)) + '%'); } As shown in the code above,after the for loop is executed i only see the divProgressIndicator filled with the background color and I am not able to see the progress. Can I achieve this in a for loop or i need to use some thing else. Regards

    Read the article

  • seeking j2ee books recommendation

    - by john
    Hi, I'm thinking of a serious training in j2ee and found there are too many books to choose from. Could you kindly share your insights as a practicing professional in this respect? For example, some people in other post recommend "SCWCD Exam Study Kit Second Edition Java Web Component Developer Certification Hanumant Deshmukh, Jignesh Malavia, and Matthew Scarpino" by quickly looking at Amazon, I found Enterprise JavaBeans 3.0 (5th Edition) [Paperback] Richard Monson-Haefel received 141 reviews.... thanks

    Read the article

1