I'm trying to use telerik asyncUpload, it works fine in all browsers but in IE9, I should turn on compatibility mode in order to see my file upload process after I select the file, but in this demo site (http://demos.telerik.com/aspnet-ajax/upload/examples/async/webmail/defaultcs.aspx) it works fine in IE9 without need to turn on compatibility mode, how can I do something like this demo site for IE9?
when I select a file in browsers other than IE9, file name is displayed and a small progress bar showing file upload is also displayed, also a small remove button appears beside file name, but in IE9 I see nothing after select my file, I should turn on compatibility mode, I hope this description is helpful, but in demo site, everything works fine for all browsers, what am I missing?
also I'm going to store my images in database, do I need to perform postback? where I my files stored?
I found this article that sounds similar to the problem your having.
http://www.telerik.com/community/forums/aspnet-ajax/async-upload/select-button-with-not-show-the-select-files-window.aspx
Basically there has been a certain problem with the Flash module in IE9, which is related to the Flash. Which could be why your not seeing anything in IE9.
If this is the issue they suggest disabling the flash module with the following JS:
<script type="text/javascript">
Telerik.Web.UI.RadAsyncUpload.Modules.Flash.isAvailable = function () { return false; }
</script>
Related
I am trying to debug a Wordpress issue where a is being auto inserted before the end of the <script> tag, hence breaking the javascript.
If I view the element with the inspector, I can see a as shown below:
However if I viewsource, or download the html page and look at it, there is no :
});
});
setTheRepeaterButton();
});
</script></p>
At first i thought it was a chrome bug, but I get the exact same behaviour in firefox.
I would think there is no , however the script is broken which implies there is one. Which is correct, the inspector or the page source?
It looks like there is a hidden/invisible character before the final } in the script. Depending on your code editor, you can toggle a setting to view hidden characters or add a plugin (e.g. nbsp-vscode for VS Code).
Or the easiest solution is to delete the space between that } and the preceding ; and redo the code formatting.
I am using wordpress default core player mediaelement.js to play self-hosted videos.
By putting the [video] shortcode, I am generating the video rendering code in the front end.
For event binding I am using the Mediaelement's events as described here:
$('video').bind('loadeddata', function(e) {
alert('loaded');
});
$('video').bind('playing', function(e) {
alert('playing');
});
$('video').bind('pause', function(e) {
alert('pause');
});
$('video').bind('ended', function(e) {
alert('ended');
});
This is working perfectly in Internet Explorer and Firefox. But in case of safari, it's not working.
Please provide any solution.
It is the weird behavior of Safari Browser as explained by Johndyer in issue number #536 quoting below:
This is a really frustrating part of safari in that it only happens
when quicktime isn't installed. In that case, Safari still acts like
it understands HTML5, but it fails in strange ways that I haven't been
able to detect. So just install QuickTime adn you'll be all set.
Its is working fine with Quicktime installation.
I am currently building a flex application and would like to allow deeplinking to produce nice URLS such as http://site.com/#/account/settings and so on.
I have looked at swfaddress 2.4 and swfobject 2.2 to embed the swf and provide the deeplinking. So far everything works in Firefox and Chrome. However, in Internet Explorer 9, the back button and history functionalilty does not work, which is rather frustrating.
Interestingly, the Flex sample file here http://www.asual.com/swfaddress/samples/flex/ works pefectly in IE9. Upon futher inspection, it seems that they are using the ac_OETags.js file to embed their swf. Going through the documentation as well as the index.html file generated by flex, it seems that they are now using the latest version of swfobject as the preferred way to embed swf files.
Having said that, swfobject haven't been updated for more than a year. I am also unsure as to whether the author intends to update it. On the other hand, I do not like the way adobe's history.js works for deeplinking. Urls such as http://site.com/#view=1 looks very ugly in my opinion.
In light of the above, what libraries do you recommend for embedding swf files and deeplinking in a flex 4.5 project?
Those 2 are the best out there and I recommend you use both. With that said, I would try to debug the javascript/flex to see why this isn't working in IE9 and fix the code on both open source projects so that other developers can benefit from it.
The reason this is happening is that Adobe never updated history.js after IE9 came out. There is code in there to handle some IE7 bugs which is being incorrectly triggered.
To fix your history.js insert the following code:
After line 22 insert:
ie9: false,
After line 72 (what was line 71):
else if (browser.version == 9)
{
browser.ie = false;
browser.ie9 = true;
}
That should fix it.
When I make any changes to my CSS file, the changes are not reflected in the browser. How can I fix this?
The fix is called "hard refresh"
http://en.wikipedia.org/wiki/Wikipedia:Bypass_your_cache
In most Windows and Linux browsers: Hold down Ctrl and press F5.
In Apple Safari:
Hold down ⇧ Shift and click the Reload toolbar button.
In Chrome and Firefox for Mac:
Hold down both ⌘ Cmd+⇧ Shift and press R.
Try opening the style sheet itself (by entering its address into the browser's address bar) and pressing F5. If it still doesn't refresh, your problem lies elsewhere.
If you update a style sheet and want to make sure it gets refreshed in every visitor's cache, a very popular method to do that is to add a version number as a GET parameter. That way, the style sheet gets refreshed when necessary, but not more often than that.
<link rel="stylesheet" type="text/css" href="styles.css?version=51">
A good way to force your CSS to reload is to:
<link href='styles.css?version=1' rel='stylesheet'></link>
And then just increment the version number as you change your CSS. The browser will then obey. I believe Stack Overflow uses this technique.
I always use Ctrl+Shift+F5 out of habit, it should force a full-refresh including by-passing any http proxies you may be going through.
I had this issue. Turns out I completely forgot I had CloudFlare setup on the domain I was live testing on.
CloudFlare caches your JavaScript and CSS. Turned on development mode and BAM!
Do Shift+F5 in Windows. The cache really frustrates in this kind of stuff
This sounds like your browser is caching your css. If you are using Firefox, try loading your page using Shift-Reload.
Having this problem before I found out my own lazy solution (based on other people suggestions). It should be helpful if your <head> contents go through php interpreter.
To force downloading file every time you make changes to it, you could add file byte size of this file after question mark sign at the end.
<link rel="stylesheet" type="text/css" href="styles.css?<?=filesize('styles.css');?>">
EDIT: As suggested in comments, filemtime() is actually a better solution as long as your files have properly updated modify time (I, myself, have experienced such issues in the past, while working with remote files):
<link rel="stylesheet" type="text/css" href="styles.css?<?=filemtime('styles.css');?>">
The Ctrl + F5 solusion didn't work for me in Chrome.
But I found How to Clear Chrome Cache for Specific Website Only (3 Steps):
As the page is loaded, open Chrome Developer Tools (Right-Click > Inspect) or (Menu > More Tools > Developer Tools)
Next, go to the Refresh button in Chrome browser, and Right-Click the Refresh button.
Select "Empty Cache and Hard Refresh".
Since I found this thread having the same problem, 10 YEARS later, I'll add my own solution too. I use PHP most of the time, and rather than requiring the user to press unusual buttons to refresh the page, or myself to remember to bump a version number embedded in a link, I used the filemtime() function to get the modification time of the css file (as a unix timestamp), and then use THAT number as the parameter.
$FILE_TIME = filemtime("main.css");
$CSS_LINK = "main.css?version=$FILE_TIME";
While results in a URL like:
http://example.com/blah/main.css?version=1602937140
This entirely disables caching, since every time the page is refreshed, it will believe it needs to grab the CSS file again, changed or not... but that's far less frustrating than forgetting to manually update this trick and wasting time wondering why it isn't right. You can always remove it from a production server.
If you are using plain HTML, you could probably engineer a javascript wrapper or some such, but that's probably more trouble than it's worth.
Have you tried renaming the new version of your CSS to CSSv2.css and then directing your page to use that? If that solves the stale-file issue, then you're just experiencing non-refreshing files. If not, you've got bigger issues.
If you're using ASP.NET web forms, make sure that you are using the right theme:
I just spent about an hour trying to solve this!
Is this a local custom CSS file? Is this your website? Maybe you should clear your cache.
Also the last CSS declaration takes precedence.
I faced the same problem. Renaming the file worked for me.
The reason this occurs is because the file is stored in the "cache" of the browser – so there is no need for the browser to request the sheet again. This occurs for most files that your HTML links to – whether they're CDNs or on your server, for example, a stylesheet. A hard refresh will reload the page and send new GET requests to the server (and to external b if needed).
You can also empty the caches in most browsers with the following keyboard shortcuts.
Safari: Cmd+Alt+e
Chrome and Edge: Shift+Cmd+Delete (Mac) and Ctrl+Shift+Del (Windows)
I use Firebug and IE Developer Toolbar all the time to debug tricky CSS problems. But occasionally, a tricky bug comes up that only appears when you go to print the page.
What techniques/tools do you use to diagnose problems like this? Is there a way to get more use out of traditional CSS debugging tools in print view?
Updated: I already use a PDF printer to avoid wasting paper; my problem is that I can't right-click on the printed DOM. Some of the other answers below are quite helpful, thanks. :-)
Just found a comment by lee-penkman about a new feature in Firefox here: Press Shift-F2 in Firefox to open the browser console (not the javascript console), then enter media emulate print. Works absolutely great!
Update Sept. 2018: Starting with Firefox 62, the developer console has disappeared. There doesn't seem to be a way to activate print style emulation now.
Update Nov. 2019: It seems that in Firefox 69, there is again a new button for print style emulation. See the other answer on this page: https://stackoverflow.com/a/58015662/195476
In Chrome 51:
Open devtools (CTRL + F12 or CTRL + SHIFT + I) and click on the ... menu, click More Tools > Rendering settings to open the Rendering tab of the developer console (alternatively, if the console is open just navigate to this tab).
In that tab, select and check the box for Emulate Media: print.
I use the WebDeveloper plugin and the CSS --> Display CSS by Media Type --> Print to view the CSS as it would when printed. Firebug's inspection utilities work with the CSS as filtered by the plugin.
In Firefox 69, I found a button to simulate print media. Just open the Developer Tools (F12) and click on Inspector. The toggle button is the leftmost icon that's in the highlighted section in the screenshot below, the one that looks like a sheet of paper.
I use Firefox and the developer toolbar.
I use the real time css edit tool in the task bar, it's pretty usefull to modify your css on the fly on see the results in real time.
I also use the outline feature, which the div and stuff like that on mouse over, on your website. Really helpful to find div.
For the print problem, go to CSS -> Display CSS style by media -> print
There are a lot of other tool available in this one, I probably use about 10% of it.
Try maybe you find something usefull.
In chrome developer tools (F12 \ Ctrl(cmd on mac) + Shift + C):
In the emulation tab (From Chrome 32 onward IMHO), there is a tab for 'Media'.
There you can check the media emulation checkbox and select the media you would like to emulate ('print', 'screen' etc.)
How about just listing your print CSS last, and removing the "print" condition from your CSS link or import statement? Then you're debugging the print CSS in the browser window.
I use the Adobe PDF virtual printer, because it's the closest thing to a real printer you'd get, without wasting ink and paper.
Anyway, it's recommended to have a separate CSS for prints, with much simpler graphics and less of the images you use just for design purposes.
I always used web developer toolbar (as described in the other answers), but Firebug seems to miss some styles from time to time. So I added a Bookmark to my browser and added the following Javascript as URL of the bookmark. Now I can simply switch to print style by clicking the bookmark:
javascript:(function(){var%20h,a,f;a=document.getElementsByTagName('link');for(h=0;h<a.length;h++){f=a[h];if(f.rel.toLowerCase().match(/stylesheet/)&&f.href&&(f.media=='print'||f.media=='screen')){var%20g=f.href.replace(/(&|%5C?)forceReload=\d+/,'');if(f.media.toLowerCase().match(/screen/))f.media="dontshow";if(f.media.toLowerCase().match(/print/))f.media="all";f.href=g+(g.match(/\?/)?'&':'?')+'forceReload='+(new%20Date().valueOf());}}})()
The code above finds all stylesheet links, tests if it is media=print and if so it changes it to media=all (and hides all media=screen by replacing it with media=dontshow) and reloads the stylesheets by adding a time token to the URL. The basic reload script is from someone else, I added media part.
This works great for me!
This would be the more readable version of the JavaScript URL above for explanation:
javascript: (function() {
var h, a, f;
a = document.getElementsByTagName('link');
for (h = 0; h < a.length; h++) {
f = a[h];
if (f.rel.toLowerCase().match(/stylesheet/) && f.href && (f.media == 'print' || f.media == 'screen')) {
var g = f.href.replace(/(&|\?)forceReload=\d /, '');
if (f.media.toLowerCase().match(/screen/)) f.media = "dontshow";
if (f.media.toLowerCase().match(/print/)) f.media = "all";
f.href = g(g.match(/\?/) ? '&' : '?')
'forceReload=' (new Date().valueOf());
}
}
})()
Print to Microsoft XPS Document Writer if you don't want to pay money. Or use SnagIt if you've got the funds (free trial on site).