craigsherman Posted June 23, 2009 Report Share Posted June 23, 2009 I have a javascript file that is larger than 10,000 characters so it cannot be inserted into the footer of my Update Datapage. Caspio sent me info on how to place the javascript file on my server and reference it in the footer of my Datapage. It doesn't work, even on a very simple test. Any ideas why? Here's what I have... URL of test page: http://b3.caspio.com/dp.asp?AppKey=acb7 ... e4h1d9c3f2 Field names: 'Entered' is the entry field. 'Calculated' is the output field. (the script just adds 7 to the Entered value) In the HTML block: In the Javascript file: function calculate() { var entered = document.getElementById("EditRecordEntered").value; var output = (entered+12); document.getElementById("EditRecordCalculated").value = Math.round(output); } document.getElementById("caspioform").onsubmit= calculate(); Quote Link to comment Share on other sites More sharing options...
craigsherman Posted June 24, 2009 Author Report Share Posted June 24, 2009 Here is the revised calculate function, I incorrectly had () at the end. It still doesn't work... document.getElementById("caspioform").onsubmit= calculate; Quote Link to comment Share on other sites More sharing options...
hollberg Posted July 1, 2009 Report Share Posted July 1, 2009 As a short term fix, have you 'minified' your javascript? You can use the JsMin tool at http://fmarcia.info/jsmin/test.html to compress your raw javascript code by 50-80% to get it under the 10k character limit. I hope this helps. Mitch Hollberg http://morrisonanalytics.com Quote Link to comment Share on other sites More sharing options...
craigsherman Posted July 1, 2009 Author Report Share Posted July 1, 2009 Thanks, great resource. I actually fixed it. What you need to do is strip out the Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.