Javascript insert parameter inside string
- by amemak
Hi,
I want to ask if there is a way to insert variable inside another string which is part of another statement. For example:
function SomeFunction(field) {
var someVariable = document.getElementById('<%=' + field + '.ClientID %');
}
But I've got an error:
Error 6 'string' does not contain a definition for 'ClientID'
Thank you.