Search This Blog

Showing posts with label JQuery. Show all posts
Showing posts with label JQuery. Show all posts

11 February 2014

How to check if at least one field is set in a form before submiting using JQuery

I have a form with many fields (Textbox, Listbox, Checkbox, Radio Button, File box, Text Area) in my PHP page. When submitting the form, I need to check at least one field must be set. If it’s not I don’t want to submit the form. The form is having lots of control, so it’s not a good idea to go through each control to check if a value is set. So here is a JavaScript function which will make the job very easy.




09 September 2011

Calling Javascript when JQuery UI Tab is selected or clicked

 Recently I had a requirement in one of my project. I am using JQuery UI Tabed view and what I required was to send an Ajax call when a tab is selected. At the start I find it tough to capture onClick or onSelect event of tabs. But later on I got the solution, I would like to share it with all of you. In below given example I put both solutions that I found to capture if a tab is clicked or selected.



26 May 2011

Creating a scrollable table with fixed row and column

To create a Scrollable Table you will need to download JQuery library and jquery.fixer plugging from http://plugins.jquery.com/project/fixer

On this page when you click on download link, a zipped folder will get downloaded. Unzip that folder and then copy "jquery.js" and "jquery.fixer.js" files into the folder where your webpage exist.

To create a scrollable table into your webpage, all you need to do is include "jquery.js" and "jquery.fixer.js" files in your webpage and then on document.ready event, for the table on which you want to enable scrolling call fixer function from "jquery.fixer.js" file. For more detail, see the demo code given below.


13 March 2011

Add & Remove values to a Multi Select list box using JQuery

This control is used to add value to a multiselect list box. And to remove multiple values fron this list box.


Where this control can be useful?
Consider the requirement for adding attributes along with it values (eg. attribute colour with values like red, green, blue... where the number of attribute values are not fixed). Is's good to use this control for adding multiple attribute value, rather then having a seperate screen to add the values.

JQuery Script to add table row and column dynemically