Script error: Permission Denied, Error 53

204 views
Skip to first unread message

ckittred

unread,
Dec 7, 2012, 2:41:56 PM12/7/12
to heo-i...@googlegroups.com
Hello everyone,

Every once in a while I'll get this error when opening an iForm in HEO, both for standard and VGR. It usually happens immediately after I've uploaded an html via ftp.   I've fixed some instances of it by renaming any javascript variables called "inputs", but that's not working in this case.  Anyone have any clue what causes this?

- Chris




SK

unread,
Dec 11, 2012, 2:53:28 PM12/11/12
to heo-i...@googlegroups.com
In instances where I have encountered this error the cause has been a bad piece of code within a <SCRIPT> statement.

Scott Morris

unread,
Dec 11, 2012, 4:45:59 PM12/11/12
to heo-i...@googlegroups.com
I just got this same error today for the first time.  I'd be glad to know more details if you find the source of the problem.

ckittred

unread,
Dec 12, 2012, 9:08:11 AM12/12/12
to heo-i...@googlegroups.com
After more research the best I can figure is that HEO makes use of iframes, and some kind of variable conflict or cross-origin request is occurring.  The only solution I've got so far is to disable chunks of code one by one until the error goes away. Usually the culprit has been a variable I use called "inputs", I just rename it and the error stops. In this case it was a simple jquery function. Stranger yet is that the error sometimes goes away after a few release/bounces with no changes to the code.

Obviously this is not an ideal solution, if anyone finds out more I'd love to know!

Scott Morris

unread,
Dec 20, 2012, 4:42:29 PM12/20/12
to heo-i...@googlegroups.com
Ok, I think I just came across the answer to this problem based on a conversation with Mark Pratt.  HEO takes two passes at the form, one to parse out all of the @@ variables and BASE_URL stuff, then the second pass to actually "render" the page.  JavaScript that is run on the window or body "onload" event only get run after the page is rendered (after the second pass) and code that runs outside of that (either there in your header or elsewhere in you page) will run both times.  Most times it's not an issue (doing a simple calculation or whatever).

Where you'll run into issues is if you try to call a function that resides in one of your externally-referenced JS files.  Since the parsing hasn't happened and the page isn't actually being rendered, there's no connection to those files and it'll throw this weird error.  Check your file for scripts that "will just run" outside of any event and that call external functions.

I'm pretty sure this is the problem, but please let me know if you find otherwise.

Jason Murray

unread,
Dec 20, 2012, 4:45:24 PM12/20/12
to heo-i...@googlegroups.com
On a similar note:

I've seen this error when I have jquery document.ready calls in the actual htm page. If I move the code to an external js file then it runs no problem.

Since I use all-purpose js files, my solution is to use document.ready in the js file, and from there call a function called "documentReady()" (or whatever), but only if it's defined. Then when I need page specific code to run onload, I just create the documentReady() function on the htm page and it's called by the external js file.

Jason Murray

________________________________
--
You received this message because you are subscribed to the Google Groups "HEO iForms" group.
To post to this group, send email to heo-i...@googlegroups.com.
To unsubscribe from this group, send email to heo-iforms+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/heo-iforms/-/CwUM4YawNPMJ.
For more options, visit https://groups.google.com/groups/opt_out.



winmail.dat

ckittred

unread,
Dec 21, 2012, 9:12:22 AM12/21/12
to heo-i...@googlegroups.com
Very good info.  That does solve the most recent instance I've had with this error. To add to what Jason said, I found that wrapping any of your jquery $(document).ready calls in an empty try...catch will also avoid the error message.

It still doesn't explain some other cases I've had, where there is no jquery and no external js file referenced. Trying to click through the error results in a blank page for the user.  If anyone experiences this, the culprit is usually a javascript variable name. Find out which one and change it to something unique

Scott Morris

unread,
Dec 21, 2012, 9:54:09 AM12/21/12
to heo-i...@googlegroups.com
Mark Pratt sent me this snippet of code that he uses / recommends to allow the standard jQuery "$(document).ready(function() { ... });" syntax to work.  I haven't tried it yet personally, but I thought it might be relevant / helpful to this discussion.

if (typeof $ == 'undefined') {
    window
.onerror = function (e) { return true; }
    window
.alert = function () { return true; }
}

Michael Hudson

unread,
Dec 21, 2012, 10:02:29 AM12/21/12
to heo-i...@googlegroups.com
I use this on all my jquery iforms and it solves the error.


--
You received this message because you are subscribed to the Google Groups "HEO iForms" group.
To post to this group, send email to heo-i...@googlegroups.com.
To unsubscribe from this group, send email to heo-iforms+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/heo-iforms/-/Y3JP2Vfjc2AJ.

Jason Murray

unread,
Dec 21, 2012, 10:03:29 AM12/21/12
to heo-i...@googlegroups.com
Looks like it surpresses errors and alert boxes if jquery isn't yet loaded or available. Sounds useful but also sounds like it could make debugging a hassle.

Jason

________________________________

From: heo-i...@googlegroups.com on behalf of Michael Hudson
Sent: Fri 12/21/2012 10:02 AM
To: heo-i...@googlegroups.com
Subject: Re: Script error: Permission Denied, Error 53


I use this on all my jquery iforms and it solves the error.


On Fri, Dec 21, 2012 at 9:54 AM, Scott Morris <scott.r...@gmail.com> wrote:


Mark Pratt sent me this snippet of code that he uses / recommends to allow the standard jQuery "$(document).ready(function() { ... });" syntax to work. I haven't tried it yet personally, but I thought it might be relevant / helpful to this discussion.


if (typeof $ == 'undefined') {
window.onerror = function (e) { return true; }
window.alert = function () { return true; }
}




--
You received this message because you are subscribed to the Google Groups "HEO iForms" group.
To post to this group, send email to heo-i...@googlegroups.com.
To unsubscribe from this group, send email to heo-iforms+...@googlegroups.com <mailto:heo-iforms%2Bunsu...@googlegroups.com> .
winmail.dat

Scott Morris

unread,
Dec 21, 2012, 10:09:58 AM12/21/12
to heo-i...@googlegroups.com
It only suppresses errors if "$" (the jQuery alias) is not defined.  So yes, it could stop you from seeing a couple of errors, but the list is short.
Reply all
Reply to author
Forward
0 new messages