I'm trying to use YUI RTE 2.9 with image uploader extension which supports the user to browse image from client hard drive as described here http://allmybrain.com/2009/07/01/example-image-upload-with-yui-rich-text-editor-270/
it works like a charm in Chrome but in IE Starting from 9 to 11 it doesn't work, for each time I try to upload image from my hard drive it says
when I opended the file i found the response located inside as
{"status":"UPLOADED","image_url":"/Files/Images/Desert.jpg"}
and nothing appeared in the editor,
Any help? Thanks!
Here is my scripts sourcing @ @
<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/element/element-min.js"></script>
<!-- Needed for Menus, Buttons and Overlays used in the Toolbar -->
<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/container/container_core-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/menu/menu-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/button/button-min.js"></script>
<!-- Source file for Rich Text Editor-->
@*<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/editor/editor-min.js"></script>*@
<script type="text/javascript" src="~/Scripts/yahoo-editor.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/connection/connection-min.js"></script>
<script type="text/javascript" src="~/Scripts/yui-image-uploader26.js"></script>
Hi all I tried to change the response header content-type from json to 'text/javascript' as the image uploader plugin needs but IE still asking me to save the file (which contains the response) but this time is UploadFromRTEXXX.js
I found alternative solution, I made the mvc action returns "string" instead of Json object the in the js files --> yui-image-uploader26.js I did a bit change instead of eval the response I used it as a string then instead of
o.staus == 'UPLOADED' //which o is the json response
var status = resp.substring(start, end)
and use this status to check is it 'UPLOADED' or not
by this means I won Vs IE :D Cheers :)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.