View Full Version : FBJS problems with DHTL and Onclick

09-03-2010, 11:11 PM
Hi, thank you so much in advance! Here is the problem...

I am trying to add dynamic HTML element (EX. <div><a href="#" onClick="deleteFriend('id');" >[delete]</a></div>),on an event call using FBJS.I am able to append the element using following code.

var oldFriendHtml = document.getElementById('friend_container');
var numi = document.getElementById('theValue');
var num = (document.getElementById("theValue").getValue()-1)+2;
numi.value = num;
var newElementId = "new"+num;
var newFriendHTML = document.createElement('div');
newFriendHTML.setInnerXTML("HTML TO BE ADDED");

The problem I am facing is that FBJS parses out the onClick part (event call ) out from the original HTML added .This stops me in the further activity on the added element .It also removes the styling added in the HTML ..

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum