You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Javascript

Why do i get "Tapestry is undefined" error on form submit?

This client-side error is clear but can be awkward to solve, it means your browser has not been able to load tapestry.js file properly. The question is 'Why' ? It can be due to multiple reasons, some of them below:

  • First, check if 'tapestry.js' is present in the head part of your resulting HTML page.
  • If you have set the tapestry.combine-scripts configuration symbol to true, Tapestry generates one single URL to retrieve all the JS files. Sometimes, this can produce long URLs that browsers are not able to retrieve.
  • If you have included jQuery in conjunction with Tapestry prototype, that should generate conflict with prototype's '$' selector. In this case, you should put jQuery on top of the stack and turn on the jQuery.noConflict mode
  • Also, if you have included a custom or third-party JS library on top of the stack that causes the Javascript parsing to fail, then check the javascript syntax in that library.
  • If you have used a tool to minimize your javascript libraries, this can lead to javascript syntax errors, so check if it works with all the javascript files unpacked.
  • No labels