I can't figure out
why the following function keeps returning undefined
// retrieve a form
name from an object
function getFormName( obj )
{
var parent = obj.parentElement;
if ( parent.tagName == 'FORM')
{
var formName = parent.getAttribute('name');
return formName
}
else
{
getFormName( parent );
}
}
function getFormName( obj )
{
var parent = obj.parentElement;
if ( parent.tagName == 'FORM')
{
var formName = parent.getAttribute('name');
return formName
}
else
{
getFormName( parent );
}
}
While if I put a
alert within the function I can see formName is populated with a correct
value
Any
ideas?
Taco
Fleur
0421 851
786
Tell me and I will forget
Show me and I will remember
Teach me and I will learn
Tell me and I will forget
Show me and I will remember
Teach me and I will learn
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004
