AsyncFileUpload in modal dialog - javascript

I've came across strange issue with AsyncFileUpload and file larger than value in:
<httpRuntime maxRequestLength="4096" />
It is working "fine" in page itself by showing "Permission denied" message and I'm also capable of handling it using OnClientUploadError script.
However when I access same page using:
window.showModalDialog()
my page gets frozen.
Any idea on what could cause this kind of behavior?
Thank you.
p.s. At the moment it is kind a hard to switch to AjaxFileUpload or ModalPopupExtender, so I really hope there is some way of solving this issue using existing components.

Use github.com/rgrove/lazyload/ as this is the simple and effective asynchronous css and js file load

Related

Blank screen when running reactjs webapp in browser

I'm using Reactjs to create a browser based web application which interacts with MongoDB. Everything was working fine until I added webpack. Now, everything still seems to be working fine except when I try to run the application I get a blank screen.
I've went through my code and can't see what I've done wrong and after doing some online research I believe the issue could be caused by any number of things.
Are there any logs which could be used to help investigate this? Failing that, is there a recommended way to investigate this?
As #konekoya stated, the Browser developer tools can be used to identify issues. In my case it showed the error that was preventing my browser from loading properly, I was then able to troubleshoot and solve my issue off the back of it.

Sporadically get error only in iFrame: Main.js Interpreted as amd module format, but called System.register

I'm seeing the error below in console only when loading in iframe when loading compiled ES6 Javascript classes using SystemJS v 0.19.41.
system.src.js:3054 Uncaught Error: Module https://d1jbmqjs327xbn.cloudfront.net/_ra/spaces-developer.pxand/assets/js/framework/builder/builder-client.js interpreted as amd module format, but called System.register.
at a. (system.src.js:3054)
at a. (system.src.js:3773)
at a.reduceRegister_ (system.src.js:4268)
at HTMLScriptElement.m (system.src.js:2851)
This seems to be the same issue as the one that was closed a couple years ago, but for this case it only happens in an iframe.
https://github.com/systemjs/systemjs/issues/970
It happens consistently in Safari, but sporadically in Chrome. The issue only started last week with no code change so I'm at a lost on what could have gone wrong. When this error occurs, it simply stop execute the Javascript which is very problematic.
Anyone has any idea on what could be the root cause of this issue?
Just in case this helps anyone. I found that the issue was with jQuery UI as it's using AMD by default. I had to revert back to an older version to fix this issue. The only explanation I have for the sporadic behavior in Chrome is that Chrome doesn't consistently execute scripts at the same rate unlike Safari. However, this still doesn't explain why I started seeing the issue all the sudden without any change.
So if this ever happens to you, look for a library that loads dependencies using AMD by default and either load them using import instead or if you don't have a choice, try rearrange the order of import and move the one that's causing the issue up. For my case, that's not possible and that's why I had to use an older version of jQuery UI.
As for why it only happens when it's in an iframe. Well, it remains a mystery. I can only think that it's because how content in iframe is loaded by browser. I would love to hear an opinion from an expert on this.

Error jQuery requires a window with a document

I'm running a Rails 4.2 app and I am getting the spinning cursor. Found this error. But I don't know how to deal with it. I am using a template. What causes this? what should I be looking for to fix it? I don't even know what code I should post to show here.

Firebug causes Firefox to be unresponsive

I'm a beginner web developer. I often use Firebug to debug my JavaScript.
Problem is that there are some script files from my page's UI that have a lot of code and this causes my web browser to be unresponsive, i.e. I get a dialog saying the script is unresponsive. Basically this happens when I am within Firebug's Script panel.
How can I deal with this?
I tried finding solution to this problem and nothing.
As for the answer I think the best was posted by #Pablo(can't assign answer to comment unfortunately) and it is simply trying out Google Chrome console. None of the problems I mentioned exists here.
Cheers guys!
I have had the same problem debugging some of our older scripts that make extensive use of the eval() function.
This causes many scripts to be displayed within the Script Location Menu. (Each dynamically generated script is represented there.)
A possible solution, given that it was caused by the number of files in my instance, might be to see if you can bypass the problem entirely by utilizing fewer source files for the same code. Using a 'built' version of whatever frameworks you use might alleviate the problem. (Particularly if they still are debug-able in a built form.)
If that does not work, you might try debugging using Firefox' built-in debugger (available via Ctrl+Shift+S. (Or switch to another browser to do the debugging, but that is obviously a far less desirable solution.)

Why does has my javascript stopped working on live site, but works fine in test environment?

Okay, this is very weird...
http://connecttofriends.com/admin/login
I'm writing an administration control panel and am using a template from Theme Forest (because I didn't sign on to create any graphics, so my client bought it). For the login page listed above, I had to program it to run through Javascript due to the way it was set up.
I got it working and everything. Suddenly, though, something bizarre happened, and Javascript has not worked on that page at all since. None of my Javascript will even appear in Firebug, and I haven't been able to find anything to suggest that there's a Javascript error. Worse yet... on my local test server, it works perfectly fine. It just refuses to work on the live server for whatever reason.
Has anything like this ever happened before? How can I possibly fix this? I can't find anything wrong, and it works fine on my test server. I've at least been able to continue development on the test server, but without the live version working its useless.
I'll post code if people ask, but I don't see much of a reason to under these circumstances because the code actually works.
Any help is appreciated...
jQuery doesn't load.
It tries to fetch jQuery from this address: http://connecttofriends.com/admin/js/jquery-1.7.min.js, and it's not there. Missing a /, to indicate root?
the path you using is not loading, why dont you use jquery link as https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js
this'll also reduce your server hits.
jquery library is not getting loaded.Please check the path of the jquery-1.7.min.js.

Categories