Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaScript Error when using Flash Forms in ColdFusion 9

I'm having a problem with Flash Forms on ColdFusion 9 that worked perfectly under ColdFusion 8. When viewing the flash form in the browser, the form elements themselves display correctly, but the data for each field is not rendered in the input elements, and not present when submitting the form. When the page loads, I get an error:

964024021.mxml.cfswf:1 ReferenceError: Can't find variable: updateHiddenValue 

The function updateHiddenValue is a function that's defined in /CFIDE/scripts/cfform.js, which is getting loaded into the page. If I use the Console and run the function directly, it runs without a problem:

enter image description here

To try and figure out why this might be happening, I fired up Charles and watched the requests to the server. As you can see in the screenshot below, the .js files receive 200 responses showing that they're good to go, but the cfswf requests are getting "connection closed" errors, and then 200 requests. The cfswf requests are obviously finishing correctly, or I wouldn't see the flash form at all.

enter image description here

So I need to figure out why I'm getting these .js errors so I can get this flash form workng. I can only assume that the error is originating from the flash side of things or via Flash Remoting (?), I just have no idea how to debug this issue and get things moving forward.

like image 663
Dan Short Avatar asked Aug 28 '12 12:08

Dan Short


1 Answers

I occurred with the same error while i was developing one application . You might be declaring some other script before this which will bring conflict . Comment all others and try again . Mine was resolved by doing this hit an trial method . I commented all scripts run my application , it worked out .

like image 198
Archit Arora Avatar answered Oct 05 '22 11:10

Archit Arora