how to remove this error ??

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
PHPycho
Forum Contributor
Posts: 336
Joined: Fri Jan 06, 2006 12:37 pm

how to remove this error ??

Post by PHPycho »

Hello forums!!
I had used the following function(for deleting div elements) and its working properly

Code: Select all

function deleteCampaignRow(parentElem, childElem){	
	var parentObj = document.getElementById(parentElem);
	var childObj = document.getElementById(childElem);
	parentObj.removeChild(childObj);		
}
when the form is submitted , it gives the error "parentObj has no properties".
how to solve the above problem ?
Any Idea ??
Thanks in advance to all of you
User avatar
idevlin
Forum Commoner
Posts: 78
Joined: Tue Jun 26, 2007 1:10 pm
Location: Cambridge, UK

Post by idevlin »

What does the HTML definition of the object you are trying to remove look like?
Post Reply