Showing results for 
Search instead for 
Did you mean: 

Hosted Form (iFrame) causes JavaScript errors



I am implementing the Hosted Form in an iFrame that itself is located in a DIV that uses the jquery UI "dialog" system.


<iframe id="iframeAuthorizeNet" name="iframeAuthorizeNet"></iframe>

<form method="post" action="" target="iframeAuthorizeNet" id="formAuthorizeNetPage" style="display:none;"> ... </form>


At this point, I am using the test environment, but I wanted to make sure this issue does not exist on the live system.


When adding a payment method, the Card Number and Card Code text fields do not react well to specific keys, e.g. the arrow keys. When I use these or other special keys, the following JavaScript error shows up in the Console:


ReferenceError: event is not defined
  var charCode = (evt.which) ? evt.which : event.keyCode
profile.js (line 62, col 6)


It seems like there could be a typo: I'm guessing that "event.keyCode" should actually be "evt.keyCode".


I'm using the most current version of Firefox on Windows 7 64bit.


Is this issue known and does it also exist in the live environment?






Has no one else ever noticed this?


Can anyone who has a live environment (I don't yet) confirm that they see the same and verify if the issue also exists in the live environment?


Could I have an admin or moderator respond and let me know that they either disproved this or have passed it on to for review?





Hello @rlund 


I've reported your issue to the product team for analysis and am waiting for a response.

I'd recommend subscribing to this topic so that you'll be alerted via email if there are updates. To subscribe, click Topic Options at the top of this thread and then select Subscribe. You'll then receive an email once anyone replies to your post.



Great, thanks!

Looking forward to hearing back.

FYI, we just switched to the live version (we may or may not be in sandbox mode - I think we were told we were fully live), and I see the same JavaScript issue!


Again, from what I can tell, it's a simple typo of changing "event" to "evt" or defining "event".


I just switched the iframe to, so I'm fairly sure I'm at least on the live servers.


Please let me know if you need further information.