#173 new
Mark A. Ziesemer

Attempting form.submit() causes ReferenceError, "__submit__" is not defined.

Reported by Mark A. Ziesemer | June 9th, 2010 @ 06:36 AM

Apparently form.submit() is not (fully) implemented.

Minimal test case:

document.createElement("form").submit();
org.mozilla.javascript.EcmaError: ReferenceError: "__submit__" is not defined. (env.rhino.1.2.js#12414)
    at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3654)
    at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3632)
    at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3717)
    at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1758)
    at org.mozilla.javascript.ScriptRuntime.getNameFunctionAndThis(ScriptRuntime.java:2135)
    at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3134)
    at script(env.rhino.1.2.js:12414)
    at script(unnamed script:1)
...

I very well may not be doing something correctly, but I couldn't find any other Envjs examples for submitting a form, and this looks simple enough. I understand that this is not a complete example, as there is no action or method defined, but this isn't impacting the result.

[  Envjs/1.6 (Rhino; U; Windows XP x86 5.1; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13  ]

Comments and changes to this ticket

  • Bryan Castillo

    Bryan Castillo May 31st, 2012 @ 07:49 AM

    • Milestone order changed from “0” to “0”

    I am seeing this error as well.

    It looks to me like there is a bug. I looked at env.rhino.1.2.js.

    I see that there is a local variable submit created within an anonymous block and used in the definition of HTMLFormElement.prototype.submit for html.1.2.13. submit would not be visible outside of that anonymous function.

    6473: * Envjs html.1.2.13
    6479://CLOSURE_START
    7263:var submit = function(element){
    8722: var event = submit(this);
    10761://CLOSURE_END

    Later on in xhr.1.2.13 HTMLFormElement.prototype.submit is reset and submit is used again, but it is not visible.

    12337: * Envjs xhr.1.2.13
    12343://CLOSURE_START
    12414: var event = submit(this),
    13190://CLOSURE_END

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

a javascript browser environment

Pages