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/${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/${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)

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


<a onclick="remove('someID');">Remove</a>