Im trying to use document.write in order to create a html element that will link to a function. However I am getting:
SyntaxError: missing ) after argument list"
The document.write is also inside a for loop as it needs to dynamically create links for each piece of data.
standardArray[i] = '<a href ="javascript:void(0);" onclick = "showDetails(null, null, ' + stdata.rows.item(i).Title + ');">' + stdata.rows.item(i).StandardNumber + ' ' + stdata.rows.item(i).Title;
document.write(standardArray[i]);
Any ideas?
CORNEAL CALCIUM CHELATIONis not a proper JavaScript syntax.standardArray[i] = "<a href ='javascript:void(0);' onclick = 'showDetails(null, null, '" + stdata.rows.item(i).Title + "')';>" + stdata.rows.item(i).StandardNumber + " "+ stdata.rows.item(i).Title;