Hello,

following code fragment given:
~~~
function jsPostAppend(script, form_id)
{
 if(form_id)
  //parameters='&' + $(form_id).serialize() // first flavour
  parameters='&' + Form.serialize($(form_id)) // second flavour
[...]
~~~
This works perfect for FF2, IE7 and Safari3 (in both flavours).
With Opera 9.x, I get the following javascript errors:

First flavour:
~~~
JavaScript - https://...url.../file.php
Event thread: click
Error:
name: TypeError
message: Statement on line 47: Type mismatch (usually a non-object
value used where an object is required)
Backtrace:
  Line 47 of linked script https://...url.../file.js
    parameters = "&" + $(form_id).serialize();
  Line 1 of  script
    jsPostAppend("/path/to/script.php", "delete", "form_submenu",
"body");
  At unknown location
    [statement source code not available]
~~~

Second flavour:
~~~
JavaScript - https://...url.../script.php
Event thread: click
Error:
name: TypeError
message: Statement on line 3388: Type mismatch (usually a non-object
value used where an object is required)
Backtrace:
  Line 3388 of linked script 
https://thomaskochit.dyndns.org/js/prototype/prototype.js
    key = element.name;
value = $(element).getValue();
  Line 701 of linked script 
https://thomaskochit.dyndns.org/js/prototype/prototype.js
    memo = iterator(memo, value, index);
  Line 595 of linked script 
https://thomaskochit.dyndns.org/js/prototype/prototype.js
    iterator(value, index++);
  Line 835 of linked script 
https://thomaskochit.dyndns.org/js/prototype/prototype.js
    iterator(this[i]);
  Line 596 of linked script 
https://thomaskochit.dyndns.org/js/prototype/prototype.js
    this._each((function (value)
{
  iterator(value, index++);
}
));
  Line 702 of linked script 
https://thomaskochit.dyndns.org/js/prototype/prototype.js
    this.each((function (value,index)
{
  memo = iterator(memo, value, index);
}
));
  Line 3386 of linked script 
https://thomaskochit.dyndns.org/js/prototype/prototype.js
    var data = elements.inject({}, (function (result,element)
{
  if (! element.disabled && element.name)
    {
      key = element.name;
      value = $(element).getValue();
      if (value != null && (element.type != "submit" || ! submitted &&
submit !== false && (! submit || key == submit) && (submitted =
true)))
        {
          if (key  in  result)
            {
              if (! Object.isArray(result[key]))
                result[key] = [result[key]];
              result[key].push(value);
            }
          else
            result[key] = value;
        }
    }
  return result;
}
));
  Line 3408 of linked script https://...url.../prototype/prototype.js
    return Form.serializeElements(Form.getElements(form), options);
  Line 47 of linked script https://...url.../file.js
    parameters = "&" + Form.serialize($(form_id));
  Line 1 of  script
    jsPostAppend("/path/to/script.php", "delete", "form_submenu",
"body");
  At unknown location
    [statement source code not available]
~~~
Remark: form_submenu is a valid form.

Any ideas?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to