Access iFrame element from parent page using jquery

To access an iFrame element from its parent page we can use following JQuery function. $(‘#frmiFrameTest’).contents().find(“[id*=element-id]“) frmIframeTest= Iframe Id   element-id = Id of element in iFrame.      

Apply CSS Style to the parent page based on condition in an IFrame content.

I was given asn assignment to change theb back ground image of the parent page for a pop up window which as being opened using JQuery color box pluging. The pop up page was being opened in an iFrame (html tag). In Iframe we had a div with the Id and also we had the [...]

Blessings of Jquery “each” and Jquery selectors – asp.net mvc form validation

Let me explain the following code and what i think about the topic “Blessings of Jquery “each” and Jquery selectors – asp.net mvc form validation” <script type=”text/javascript”> $(document).ready(function() { var isValid = false; $(‘input:text’).each(function() { if ($(this).val() == “0″) { $(this).val(“”); } }); $(“#btSubmit”).click(function() { $(‘input:text’).each(function() { if ($(this).val().length > 0) { isValid = true; [...]

Porting JQuery RC4 encryption to c# .Net 3.5

Recently I had a task that involved unencrypting an encrypted query string that had been encrypted on the front end using JQuery’s RC4 encryption located in file: JQuery.rc4.js. I needed to un-encrypt the encrypted string in the c# code-behind: Below is a line for line port of the JQuery.rc4.js. library functions I needed. I made [...]

Retain Jquery accordion current index across the asp.net post back

Retain Jquery accordion current index across the asp.net post back. We need to use a hidden field here to save the current index so we can retrieve it back on the post back. JQuery Rocks and flying high. ASP.Net code <asp:HiddenField ID=”hfaccordion” runat=”server” /> <div id=”accordion”> <h3> <a href=”#”>Test 1</a></h3> <div> Test 1 <asp:Button ID=”Button2″ [...]

Retain Jquery Tabs current tab across the asp.net post back

Retain JQuery Tab’s  current tab across the asp.net post back. We need to use a hidden field here to save the current tab index so we can retrieve it back on the post back. JQuery Rocks  and flying high. ASP.Net code <asp:HiddenField ID=”hidLastTab” runat=”server” /> <div id=”tabs”> <ul> <li><a href=”#academicclass”>Academic Class</a></li> <li><a href=”#academicyear”>Academic Year</a></li> </ul> [...]

What to use with Jquery for Div html , innerHtml Or text

What to use with Jquery for Div html , innerHtml Or text? I was working on project which uses Google maps. We allow users to create polygon on the Google map and when user starts drawing polygon we were to show tool tips, you can read how we are showing tooltips using Jquery on teh [...]

Show tool tip on google map polygon drag handle using Jquery

How to show tool tip on Google map polygon drag handle when user hovers mouse over the drag handle? When user draws polygon on Google map, Google injects number of Div on to the map to  show the polygon drawn. Small squares on the polygon give the facility to drag and re-size the polygon. Those [...]

Check uncheck all checkbox in asp.net web form st using jquery

Check uncheck all check boxes on an asp.net web form using jquery. On click of the link it behaves like a toggle button and changes its text also it check and un check all check boxes on the asp.net page Asp.net Code <a href=”#” id=”lnkAll”>Check all</a> JQuery Code $(“#lnkAll”).click(function(e) { var currentVal = $(“#lnkAll”).text(); if [...]

Dual asp.net list boxes and jquery

Move selected item to the left hand side list box, move all items to the left hand side list box, move selected item to the right hand side list box, and move all items to the right hand list box.  Let’s   implement above features using JQuery. ASP.NET Code <div style=”float: left;”> <asp:ListBox ID=”ListBox1″ runat=”server” Height=”550px” [...]