[thelist] a.b.variable.d
john at johnallsopp.co.uk
john at johnallsopp.co.uk
Mon Mar 20 07:21:52 CST 2006
Hi
I want to create a ECMAScript function that will request some text and
then make that the new selection from a drop-down list of options. I'm
stuck on this bit:
function addField(pType, pFormName, pSelectName)
{
newField = prompt ('New ' + pType);
// set up select
ind = document.pFormName.pSelectName.selectedIndex;
alert (ind);
// more stuff here
return newField;
}
Obviously the pFormName won't be interpreted, it looks for it as a
literal.
I confess I'm not well practiced at ECMAScript, but I have looked
through my notes and can't find the answer to this: How do I get it to
look up the value that's been passed in?
If anyone feels on a roll, I then have the problem of adding the new
text to the selection but I'll work on that now ..
J
More information about the thelist
mailing list