You are here: Home » JavaScript

Category Archives: JavaScript

How to get value of selected radio button in Javascript?

Javascript

Today i am going to talk about, How to get value of selected radio button in Javascript? To get value of selected radio button, first define different IDs for options in HTML section. On submit button call a function, here i am calling a function validate();. You will get selected radio value in variable gen_type. HTML Part Javascript Part You ... Read More »

Create your own pop-up

Javascript

To create own pop-up, fir i an creating a button and call two function, showlight() on onMouseOver and hidelight() on onMouseOut. When mouseover on button function showlight() call and display div of image, and when mouse out hidelight() call and hide the div in which image present. set style of div. Read More »

Select all from list box

Javascript

To select all value for list box, here, i am creating a function listbox_selectall(); and passing two parameter in this function. Passing id of list box and true or false, true is using for select all and false for select none. Always use javascript:void(0), in place of # for link, when we use #, page will toggle, to avoid page ... Read More »

Print selected area

phpsage.com

Some time we have to print, only some selected area not all screen. To do it, we have to call selected area in a div and define its ID, in below example, i have define two div, first for which i have to print and second for which i don’t print. For printed div , i define its id divToPrint ... Read More »

Add more in PHP

phpsage.com

To use add more in php, we have to create a function addlinks(), in this function we define field which we have to call on alllinks() function, here we call a test field with name all_part, define it in array. Also, call a function removelinks() to remove added link. Just create a php page and paste below code, You may ... Read More »

JQuery JavaScript form validation

jquery_logo

For JQuey java script form validation. Call a function with event onclick, on form submit. You can see it in PHP Registration Form. Use a JQuery file. If required field is blank, then its border will be red, with the help of CSS, like $(“#name”).css({“border”: “1px solid red”}); And set cursor at that filed with document.regiform.name.focus(); Here i am also ... Read More »

JavaScript Dialog Boxes

Javascript

There are three JavaScript dialog boxes. 1. Alert Dialog Box. 2. Confirmation Dialog Box. 3. Prompt Dialog Box. Alert Dialog Box When we have to show warning meassage, we will use Alert Dialog Box, Suppose in form validation, User Name is mandatory field and user didn’t filled it, then we can show error message in Alert Dialog Box. Confirmation Dialog ... Read More »

Scroll To Top