Am using the following code to remove a text box from my site. So when the user clicks on remove_btn.gif a text box row gets removed.

<html:image onclick="document.getElementById('wishlistForm').action='/wishlist/send.do?method=remove&removeIndex=${status.index}';" styleId="remove" src="${siteImages.imagePath}local/localbuttons/remove_btn.gif" border="0" altKey="btn.altTxt.remove" />

Now i want to replace the remove_btn.gif with a normal hyperlink text something like this Remove. So when the user clicks on remove the text box row gets removed as before.Following coding i did but when i click no changes is there..

<a href="#" onclick="document.getElementById('wishlistForm').action='/wishlist/send.do?method=remove&removeIndex=${status.index}';"><fmt:message key="btn.altTxt.remove" /></a>

Any idea what more changes need to be done

You're better off writing a short method to remove the box in question like this

function remove(elemID)
{
	elem=document.getElementById(elemID);
	elem.parentNode.removeNode(elem);
}

You don't have to leave the page since all browsers since about 1998 (>IE5.5) have been able to use DOM manipulation

Then:

<a onclick="remove('someID');">Remove</a>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.