vindya
javascipt
1 Answer(s)      3 years and 4 months ago
Posted in : Java Beginners

anoter.asp


<html>
<head>

<script langauge='javascript' type='text/javascript'>

function addNew() {

var mainContainer = document.getElementById('mainContainer');

var newDiv = document.createElement('div');

var product_id = document.createElement('input');
product_id.id="product_id";
product_id.type = "text";
product_id.size=11;
product_id.name="product_id";

var pro_desc = document.createElement('input');
pro_desc.type="text";
pro_desc.id="pro_desc";
pro_desc.size=22;
pro_desc.name="pro_desc";
var stocks= document.createElement('input');
stocks.type="text";
stocks.id="stocks";
stocks.size=17;
stocks.name="stocks";
var newDelButton = document.createElement('input');
newDelButton.type ="button";
newDelButton.value = "Delete";

var newsaveButton = document.createElement('input');
newsaveButton.type ="button";
newsaveButton.value = "save";
newDiv.appendChild(product_id);
newDiv.appendChild(pro_desc);
newDiv.appendChild(stocks);



newDiv.appendChild(newDelButton);
newDiv.appendChild(newsaveButton);
mainContainer.appendChild(newDiv);



newDelButton.onclick = function() {
mainContainer.removeChild(newDiv);

}

newsaveButton.onclick=function(){

View Answers

January 13, 2010 at 4:12 PM


Hi Friend,

I want that code through which you are inserting data into database.

Thanks









Related Pages:
php variable in javascript
php variable in javascript  Access php variables in Javascipt or Jquery rather than php echo $variable
Ajax Web Framework, Frameworks for Ajax
. These are directly included into HTML code and used with the help of JavaScipt code. Here

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.