Anything will possible if we have a solution. I expecting the solution for passing values.

how I can get value using JavaScript/AJAX or J Query from MySQL DB before submit on blur?????

Great Job Urtrivedi! This is good to know :)

So please guide me in this regard

Go through the follwing code carefully. I have not used ajax here. Its simple php/javascript. I am assuming that your code-mf table is very small so i am storing its values in a javascript array and using it for calculation. make necessary changes whereever applicable.

<script lang='javascript'>
arrmfrates = new Array();
	/*here find code, mf from database and create one javascript array*/
	/* following loop will create javacript asscoicate array as following
	arrmfrates["c8620"] = 2;
	arrmfrates["c8621"] = 1;
	arrmfrates["c8645"] = 5;
    $result=mysql_query("select code,mf from mytable");
	while ($row=$mysql_fetch_array($result ))
		echo "\n arrmfrates['c".$row['code']."] = ".$row['code'].";";


/*this function will be called when user enters code, to find mf value stored in javascript array, this mf value is copied to "a" field of database*/
function findmf(code)


function calculate()
 //e is previous
 //f is current
 //g is new is f-e
 //code is code
 //a is mf

	if(!isNaN(previous) && !isNaN(curr) )

code <input type="text" name="code" id="code" value=""  class="input"    onblur='javascript:findmf(this.value);' > <br>
a <input type="text" name="a" id="a" value=""  class="input"   readonly> <br>

e <input type="text" name="e" id="e" value="340"  class="input" onblur='javascript:calculate();' > <br>
f <input type="text" name="f" id="f" value=""  class="input"  onblur='javascript:calculate();' > <br>
g <input type="text" name="g" id="g" value=""  class="input"  readonly >

Seems to me that you want the values calculated on the fly. You can do this on a simple Javascript, IMO this cannot be done by php without parsing the form values first.