"Erwin Moller"
<si******************************************@spam yourself.comwrote in
message news:46*********************@news.xs4all.nl...
Paul wrote:
How do I create and refer to an object as the following isn't recognised,
where as if I replace myfield with LinkLocation4536, it recognises the
field in form List
function confirmDelete(wid)
{
var myfield="LinkLocation" + wid
alert(document.forms["List"].myfield.value);
}
Hi,
document.forms["List"].myfield.value will just fetch the value of a
formelement named myfield. Which is not what you want.
Does the following code work?
function confirmDelete(wid)
{
alert ("wid="+wid);
var myfield="LinkLocation" + wid
alert(document.forms["List"][myfield].value);
}
Regards,
Erwin Moller
Hi
No that comes up with an expected identifier error but...............
alert (eval ("document.forms['List'].LiveLinkLocation" + wid + ".value") );
does
Cheers
Paul