Archive

Posts Tagged ‘form’

Remove Form Elements or any Element from Web Page (DOM) using JavaScript

Jun 3rd, 2010

Today I need to remove a form element from page based on certain input from customer. I used to do document.getElementById(‘myID’).style.display = ‘none’; and it was enough all the time. User cannot see and cannot use that element. But today it has not worked. What was the reason for that?… READ MORE

Display Message for Short Duration

Oct 13th, 2009

This is another post in beginners series. Suppose you want to dispaly dynamic message after form submit for short duration. You want the massage to dissapper after some time.
User can have option to hide it if he wants also. How you will do it?
Here is a example script… READ MORE

Avoid Form Resubmit on Refresh/reload

Oct 12th, 2009

All of us write a PHP script where script submit the form and data need to put on database or in some file. This is a very important step we learn when we start doing programming in PHP. After everything went correct you may has faced the problem of resubmitting… READ MORE

JavaScript: Displaying Message after a Action, say Form Submit

Oct 8th, 2009

You need to display a message after any action to confirm about successful completion of the action or for some error.
Suppose user has submitted a web form and you got everything fine. So in PHP you have this script:
<?php

if (count($_POST))
{

// checking / validation etc

//… READ MORE

Change Form Action and Method attributes

Jul 15th, 2007

In case you want your form action value changed based on certain condition then you can do this using simple JavaScript. In this way you can submit your single form to any of your scripts based on condition.
Here you will also find tricks for changing the method attribute of… READ MORE

Submitting two Forms at Once

Jul 15th, 2007

This is the general problem fresher struck in form submission. They struck in some logical problem and try to find their solution in submitting two forms in a web page at same time.
But answer to this question is simple. You cannot do this in general.
You can change action… READ MORE

Check, Uncheck All Checkboxes

Mar 26th, 2007

This is very common for us providing user list of choices and let them select their preferences from given choices. This kind of script is also needed in admin side for update and delete records.
Here I am providing JavaScript for doing check all/ Uncheck all and validation script after… READ MORE