You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jonathan Lee (JIRA)" <ta...@jakarta.apache.org> on 2005/09/13 22:32:55 UTC

[jira] Created: (TAPESTRY-644) Javascript error with @LinkSubmit

Javascript error with @LinkSubmit
---------------------------------

         Key: TAPESTRY-644
         URL: http://issues.apache.org/jira/browse/TAPESTRY-644
     Project: Tapestry
        Type: Bug
  Components: Framework  
    Versions: 4.0    
 Environment: tapestry-4.0-beta-6
    Reporter: Jonathan Lee


When clicking on an @LinkSubmit link, a JavaScript error is raised by the browser

Firefox
--------------------------------------------
form.submit is not a function

IE
--------------------------------------------
Object doesn't support this property or method 


Error occurs within the following generated JavaScript

function onclick_LinkSubmit()
{
  var form = Tapestry.find('saveForm');
  
  if (form.events.onsubmit_handler())
  {
    Tapestry.find('LinkSubmit').value = "T";
    form.onsubmit = null;
    form.submit();
  }
}



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Resolved: (TAPESTRY-644) Javascript error with LinkSubmit component

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-644?page=all ]
     
Howard M. Lewis Ship resolved TAPESTRY-644:
-------------------------------------------

    Resolution: Cannot Reproduce

> Javascript error with LinkSubmit component
> ------------------------------------------
>
>          Key: TAPESTRY-644
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-644
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 4.0
>  Environment: tapestry-4.0-beta-6
>     Reporter: Jonathan Lee
>     Assignee: Howard M. Lewis Ship

>
> When clicking on an @LinkSubmit link, a JavaScript error is raised by the browser
> Firefox
> --------------------------------------------
> form.submit is not a function
> IE
> --------------------------------------------
> Object doesn't support this property or method 
> Error occurs within the following generated JavaScript
> function onclick_LinkSubmit()
> {
>   var form = Tapestry.find('saveForm');
>   
>   if (form.events.onsubmit_handler())
>   {
>     Tapestry.find('LinkSubmit').value = "T";
>     form.onsubmit = null;
>     form.submit();
>   }
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Commented: (TAPESTRY-644) Javascript error with LinkSubmit component

Posted by "Jonathan Lee (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-644?page=comments#action_12330218 ] 

Jonathan Lee commented on TAPESTRY-644:
---------------------------------------

After a little old fashioned trial and error, I discovered that the problem was due to having a regular HTML submit button in the same form as my LinkSubmit named "submit". Sample fragment below:

<form method="post" action="/home/ThoughtPage,$Form_0.direct" name="Form_0" id="Form_0">
	<input type="hidden" name="formids" value="Hidden,TextField_0,TextField_1,TextArea,LinkSubmit"/>
	<input type="hidden" name="state:ThoughtPage" value="BrO0ABXcMAAAAAQAABXF1ZXJ5cA=="/>
	<input type="hidden" name="reservedids" value="state:ThoughtPage"/>
	<input type="hidden" name="submitmode" value=""/>
	<input type="hidden" name="Hidden" value="ZH4sIAAAAAAAAAE2QsW/UMBTGXw5Cq0OHqk4wUCIhQRlw1FblUFFBoDIAEVRKEWICX+714qsd++KXXrpQdWHpAANIXdnvP2BgZWBlhoGVP4ANOxEq9vT8Pf0+f9/sN4S2hOvj7EAislwrZEoPUTLKdTXKiaVCGYk77fR59vpEf1q90oEwgblMF4QFESwmY77PY8mLUZxSKYrRnQQ6Ykiw8J+S6OZ93vHFrsBTtSIh4y1O6NSzxEd2Am8gSCAkQRKboTYEJ88fpNF9434TWdIl9ro5kbEbcdyMjHuJZVrFzVL8AgfPBmPMyMaKlxIPXlV79yamVJu3+qv9lV7XX8/cQimj1DOim5F/eLi9HS2XuLsRrfTXbq+v92+0Xs5qOp0yV490Pqzai9GYXtcVeMEHYT4ma2Ie/3r/7d3VHx0IHkO4z2WFdQkLp0tPKzXA8u3s4+XzH34edwBqA+2Zc7TFZtFOJNsRCi1xZa5d/P41SL+gIz6CsOCFtvU/W98f8/3l46PgyUu6dMbzpvMAwbnDu3+Wa88lCJuCCJbaDnkxbJM37UVDYTNdFWT/AhMYQDATAgAA"/>
	<input type="hidden" name="LinkSubmit" id="LinkSubmit" value=""/>

        .... A bunch of text fields ....

	<a href="javascript:onclick_LinkSubmit();">Save</a>
	<input type="submit" name="submit"/>
</form>

The reported JavaScript error disappeared after removing the line <input type="submit" name="submit"/> or by calling the submit field something other than "submit".

> Javascript error with LinkSubmit component
> ------------------------------------------
>
>          Key: TAPESTRY-644
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-644
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 4.0
>  Environment: tapestry-4.0-beta-6
>     Reporter: Jonathan Lee
>     Assignee: Howard M. Lewis Ship

>
> When clicking on an @LinkSubmit link, a JavaScript error is raised by the browser
> Firefox
> --------------------------------------------
> form.submit is not a function
> IE
> --------------------------------------------
> Object doesn't support this property or method 
> Error occurs within the following generated JavaScript
> function onclick_LinkSubmit()
> {
>   var form = Tapestry.find('saveForm');
>   
>   if (form.events.onsubmit_handler())
>   {
>     Tapestry.find('LinkSubmit').value = "T";
>     form.onsubmit = null;
>     form.submit();
>   }
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Updated: (TAPESTRY-644) Javascript error with LinkSubmit component

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-644?page=all ]

Howard M. Lewis Ship updated TAPESTRY-644:
------------------------------------------

      Summary: Javascript error with LinkSubmit component  (was: Javascript error with @LinkSubmit)
    Assign To: Howard M. Lewis Ship

This is very odd; I just tested it (CVS head, i.e., beta-7) and it works 100%.  form.submit() is a function.  

Please shut down your browser, restart your application, clean your browser page cache, and try again.

The only thing I can imagine is that there is some other object in your DOM with the id "saveForm".  If you continue to have a problem, we're going to need to see your HTML template, page specification and the rendered HTML output.

> Javascript error with LinkSubmit component
> ------------------------------------------
>
>          Key: TAPESTRY-644
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-644
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 4.0
>  Environment: tapestry-4.0-beta-6
>     Reporter: Jonathan Lee
>     Assignee: Howard M. Lewis Ship

>
> When clicking on an @LinkSubmit link, a JavaScript error is raised by the browser
> Firefox
> --------------------------------------------
> form.submit is not a function
> IE
> --------------------------------------------
> Object doesn't support this property or method 
> Error occurs within the following generated JavaScript
> function onclick_LinkSubmit()
> {
>   var form = Tapestry.find('saveForm');
>   
>   if (form.events.onsubmit_handler())
>   {
>     Tapestry.find('LinkSubmit').value = "T";
>     form.onsubmit = null;
>     form.submit();
>   }
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org