Bug 12654 - Leopard9A235: Safari failed to submit Apple procurement form
Summary: Leopard9A235: Safari failed to submit Apple procurement form
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P1 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2007-02-06 23:24 PST by Maciej Stachowiak
Modified: 2007-03-13 00:48 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Stachowiak 2007-02-06 23:24:42 PST
2006-07-26 20:50:23 Don Melton:
* SUMMARY
While trying to approve wireless access for Darin, the web-based form at procure.apple.com failed in Safari on Leopard9A235.  I had to use Firefox to submit.  I didn't try this with any other version of Safari.  A web archive of the form is attached.

2006-07-26 20:51:24 Don Melton:
Darin saw this bug in action when it happened so he knows how to reproduce it.


2006-07-28 09:34:26 Alice Liu:
upon trying to submit the form, you get a JS error: 
The following error(s) occurred:
- You must choose an undefined .

here's the JS function.  

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- You must choose an '+nm+' .\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}

some element returned by MM_findObj doesn't have a name attribute.  I don't know what kind of element that is.  Drosera doesn't seem to work nicely with webarchives, because the breakpoints I'm setting aren't getting hit even though they clearly should.  

2006-07-28 11:04:12 Darin Adler:
This seems likely to be a regression. Geoff, could this have something to do with our changes to attributes?

2006-07-28 14:36:45 Geoff Garen:
Yes, at first glance it looks like 'val' has a name attribute set, but either (a) it's not an element that supports the name attribute or (b) the name attribute isn't explicitly tied to it in our DOM. 

I'm marking this for Leopard until we learn whether it's a regression or not.

2006-08-01 11:39:22 Alice Liu:
Safari BRB Reviewed

<rdar://problem/4654436>
Comment 1 Maciej Stachowiak 2007-03-13 00:48:54 PDT
Resolved in Radar.