- // If we come here, everything is fine, so add the data
- a.push({
- name: this.name || this.id || this.parentNode.name || this.parentNode.id,
- value: this.value
- });
+ // If we come here, everything is fine
+ var sN = this.name || this.id || this.parentNode.name || this.parentNode.id;
+ var sV = this.value;
+ if ((!sN) && (sP == 'OPTGROUP'))
+ sN = this.parentNode.parentNode.name || this.parentNode.parentNode.id;
+
+ // Add the data
+ a.push({ name: sN, value: sV });