I am using eventName in a JavaScript function. Depending on the user's
selection the correct event name is assigned. Here is the function:
function validateSelections(formObj) {
if (isValidSelection(formObj)) {
if(condition A && condition B) {
$("eventName").name='moveProjectToProgram';
}
else if(condition C && condition D) {
$("eventName").name='moveProjectToInitiative';
}
else {
$("eventName").name='moveProgramToInitiative';
}
formObj.submit();
alert("Event Name: " + $("eventName").name);
}
else {
return false;
}
}
When the Alert is executed, the result is "undefined".
When I add Alerts to each conditional to make sure they are being executed, the
correct path is executed in response to my selections.
Why is eventName undefined? I noticed that prototype has an eventName also, but
I have used this syntax before with prototype.js so I don't believe that is the
issue. I am not receiving any JavaScript or jsp compilation errors.
Any ideas on where to look?
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users