Javascript insert parameter inside string
Posted
by amemak
on Stack Overflow
See other posts from Stack Overflow
or by amemak
Published on 2010-04-05T07:52:15Z
Indexed on
2010/04/05
7:53 UTC
Read the original article
Hit count: 227
JavaScript
|getelementbyid
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.
© Stack Overflow or respective owner