mercredi 4 juin 2014

Concatenate HTMl Tags Dynamically for a Variable To Pass it as innerHTML


Vote count:

0





var routineURl = "https://www.google.com" ;
Var str = "<tr onclick='OpenInAppBrowser(" + routineURL + ")'>
<td style='text-align:right;'>
<lable>Discover for " + ItemName + "</label>
</td></tr> " ;

document.getElementById("showMainConcern").innerHTML = str ;


For Tag Onclick function is Not Firing any way.


Its Working of I dont pass URL as Parameter to the OpenInAppBrowser function as below



Var str = " <tr onclick='OpenInAppBrowser()'>
<td style='text-align:right;'>
<lable>Discover for " + ItemName + "</label>
</td></tr> " ;

document.getElementById("showMainConcern").innerHTML = str ;


asked 26 secs ago






Aucun commentaire:

Enregistrer un commentaire