RSS

Monthly Archives: July 2011

Adding and Removing Text Boxes Dynamically

You can easily add and remove text box dynamically with the help of javascript:

following  is Javascript code:

<script type=”text/javascript”>
var intTextBox=0;

//FUNCTION TO ADD TEXT BOX ELEMENT
function addElement()
{
intTextBox = intTextBox + 1;
var contentID = document.getElementById(“content”);
var newTBDiv = document.createElement(“div”);
newTBDiv.setAttribute(“id”,”strText”+intTextBox);
newTBDiv.innerHTML = “Text”+intTextBox+”: <input type=’text’ id='” + intTextBox + “‘ name='” + intTextBox + “‘>”;
contentID.appendChild(newTBDiv);
}

//FUNCTION TO REMOVE TEXT BOX ELEMENT
function removeElement()
{
if(intTextBox != 0)
{
var contentID = document.getElementById(“content”);
contentID.removeChild(document.getElementById(“strText”+intTextBox));
intTextBox = intTextBox-1;
}
}
</script>

following is the PHP Code :

<body>
<p>Demo of Adding and Removing Text Box Dynamically using JavaScript</p>
<input type=”button” onclick=”addElement()” value=”Add”> <br><input type=”button” onclick=”removeElement()” value=”Remove”></p>
<div id=”content” ></div>
</body>

Advertisements
 
Leave a comment

Posted by on Jul 25, 2011 in PHP

 

Tags: , , , , , , , ,

How upgrade magento v1.3.2.0 to magento v1.5.1.0

  1. Take the backup of original database of 1.3.2.0 and import it .
  2. Then install a fresh magento v1.3.2.0 and compare this database to its original database(of step 1).
  3. Drop all the extra table which the step 1 database has and make it equivalent to default database which create in step 2.
  4. Now install fresh magento 1.5.1.0  and give the database name of step 3 database(database after delete tables).
  5. Your admin is complete now.
  6. Create your theme as your need in frontend and make settings of your theme in admin->system->design.
  7. Make settings of your theme in admin->configuration->design.
  8. after doing all these step clear your cache.

By this method i upgrade magento 1.3.2.0 to 1.5.1.0 successfully.In my case i created new theme in app->design->frontend.Same thing is also apply in skin->fronend

 
1 Comment

Posted by on Jul 15, 2011 in Magento

 

Tags: , , , ,

 
%d bloggers like this: