swfupload ie9 error - javascript

I'm using swfupload into fancybox window. i m coding php.
my code:
var upload1, upload2;
upload1 = new SWFUpload({
// Backend Settings
upload_url: "_upload.php",
post_params: {
"PHPSESSID" : "<?php echo session_id(); ?>",
"sayfa":"YeniYazi",
"nereye":"Downloads"
},
// File Upload Settings
file_size_limit : "102400", // 100MB
file_types : "*.*",
file_types_description : "All Files",
file_upload_limit : "102400",
file_queue_limit : "0",
// Event Handler Settings (all my handlers are in the Handler.js file)
file_dialog_start_handler : fileDialogStart,
file_queued_handler : fileQueued,
file_queue_error_handler : fileQueueError,
file_dialog_complete_handler : fileDialogComplete,
upload_start_handler : uploadStart,
upload_progress_handler : uploadProgress,
upload_error_handler : uploadError,
upload_success_handler : uploadSuccess,
upload_complete_handler : uploadComplete,
// Button Settings
button_image_url : "images/XPButtonUploadText_61x22.png",
button_placeholder_id : "spanButtonPlaceholder1",
button_width: 61,
button_height: 22,
// Flash Settings
**flash_url : "swfupload/swfupload.swf",**
custom_settings : {
progressTarget : "fsUploadProgress1",
cancelButtonId : "btnCancel1"
},
// Debug Settings
debug: false
});
my problem is with swfupload. it's run ie 8, when i upgrade ie8 to ie9 starting this problem.
when i remove flash_url : "swfupload/swfupload.swf", code, works for me.
i can't upload image sorry.
help me.

Related

The listener and callback in Ext

I'm new in Ext, I see some codes in Ext.onReady(...)
tabItems.push({
id : 'schema-${form.schema.id}',
title : '${form.description}',
tabTip : '${form.description}',
tooltipType: 'title',
xtype : 'ttpanel',
executeScripts : true,
listeners : { load : initObjs, unload : unloadObjs, activate : ... },
autoLoad : { url : 'selection.do',
params : ...,
scripts : true,
callback : cb1
}
}
);
My question is, of:
"load:initObjs",
"callback:cb1",
page is rendered and user can operate it,
which of these three runs first? Why?
Thanks a million!

TinyMCE not display webpage content in IE8 browser

While I am pasting a content from a webpage, the tinymce editor in IE8 doesn't display the content.
Hi, i am adding the image that I got.
My issue is
1.I have copy content from the webpage http://ch.tbe.taleo.net/CH02/ats/careers/requisition.jsp?org=TRAILERPARK&cws=1&rid=148
and try to paste in to my tinymce editor which is open in Ie8..
2.the result is shown as like in the image as red box
Refere to Adding new fonts to TinyMCE font options
the site you're copying from uses (see the source):
#font-face
{
font-family: "Museo Slab W01 1000";
src: url("http://www.trailerpark.com/Fonts/ee02ec61-b42e-49bb-9942-0793380267f5.eot?iefix");
src:
url("http://www.trailerpark.com/Fonts/f6e64e68-be62-481f-bcf3-923028fc62e0.svg#f6e64e68-be62-481f-bcf3-923028fc62e0") format("svg"),
url("http://www.trailerpark.com/Fonts/b6bcb198-882f-4f57-a02c-07e8155aab5f.woff") format("woff"),
url("http://www.trailerpark.com/Fonts/cfa01f25-bb4c-4a09-8ba3-8afafcbb3508.ttf") format("truetype");
}
Use the method type : encoding : "raw"
function exilTinyMCEInit(args) {
tinyMCE.init({
mode : "exact",
theme : "advanced",
plugins : "paste",
elements : args,
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,bullist,numlist,undo,redo",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_buttons4 : "",
theme_advanced_toolbar_location : "bottom",
theme_advanced_toolbar_align : "center",
theme_advanced_resizing : false,
onchange_callback : "exilTinyMCEOnChangeHandler",
encoding : "raw",
setup : function(ed) {
var curElement = P2.getFieldObject(ed.id);
if (curElement.disabled || curElement.readOnly) {
ed.settings.readonly = true;
} else {
ed.settings.readonly = false;
}
}
});
}

How to stop Uploadify from displaying progress box

Just as the title says, I can't seem to get Uploadify to stop displaying the progress box during upload. Here is what I have:
$('#imageupload').uploadify({
'swf' : 'scripts/uploadify/uploadify.swf',
'uploader' : 'scripts/uploadify/uploadify.php',
// Put your options here
'buttonText' : 'Select Image',
'uploadLimit' : 999,
'overrideEvents' : ['onUploadProgress'],
'multi' : false,
'formData' : {'yourid' : '<?=#(int)$_SESSION['user']?>'},
'fileSizeLimit' : '2MB',
'fileTypeExts' : '*.gif; *.jpg; *.png; *.JPG; *jpeg',
'fileTypeDesc' : 'Image Files',
'onUploadStart' : function(file) {
$("#imageupload").uploadify("settings", "formData", {'yourid' : $(".userid").attr("id")});
$(".imageuploadbox #imagepercent").css("display", "inline");
},
'onUploadSuccess' : function(file) {
var currenttime = new Date();
$("img#yourprofilepic").attr("src", "images/artist_pictures/thumbs/artist_8.jpg?"+currenttime);
},
'onUploadProgress' : function(file, bytesUploaded, bytesTotal, totalBytesUploaded, totalBytesTotal) {
var percentcomp = (100*(totalBytesTotal/totalBytesUploaded)).toFixed(0);
$('.imageuploadbox #imagepercent #percentcomplete').html(percentcomp);
}
});
It's simple try this:
Remove link to uploadify css and then add this in your css:
.uploadifyQueue
{
display:none;
}
It seems like the names have changed, this one worked for me:
#upload_pc-queue{
display:none;
}

convert p to br on tinyMCE

Please help. I use tinyMCE as inline editor. So I need that when user in edit mode press enter then will be <br /> not <p>. I read manual and FAQ and try
tinyMCE.init({
'height' : '100%',
'widht':'100%',
'content_css' : styles + ',/sdtc-new/nc/interface/common/css/mce-editor.css',
'mode' : "specific_textareas",
'editor_selector' : prefix + o.id,
'theme':'advanced',
theme_advanced_buttons1: o.buttons.join(','),
theme_advanced_buttons2 : "",
**theme_advanced_buttons3 : "",
force_br_newlines : true,
force_p_newlines : false,
forced_root_block : '' // Needed for 3.x**
});
But it's not work . Actually some time it's work like when I delete all conetent in edit area and type new text. But i need that it works all time. Please help. Version of tinyMCE 3.4.4
You will need to set
tinyMCE.init({
forced_root_block : false,
force_br_newlines : true,
force_p_newlines : false
...
});
Here is a helpfull section of the tinymce FAQ.

How I can add multi TinyMCE editors with different config for each one?

I want to add multi TinyMCE editors and each one has its own configuration in one page?
How I can do it?
You could do something like this:
jQuery version:
$('textarea.editor1').tinymce(
{
script_url : '../admin/tiny_mce/tiny_mce.js',
theme : "simple",
plugins : "", // put plugins here
setup : function(ed)
{
ed.onInit.add(function(ed)
{
});
}
});
$('textarea.editor2').tinymce(
{
script_url : '../admin/tiny_mce/tiny_mce.js',
theme : "simple",
plugins : "", // put plugins here
setup : function(ed)
{
ed.onInit.add(function(ed)
{
});
}
});
Non-jQuery version:
tinyMCE.init(
{
mode : "textareas",
theme : "simple",
editor_selector : "editor1"
});
tinyMCE.init(
{
mode : "textareas",
theme : "simple",
editor_selector : "editor2"
});
This is easy to achieve. I use the jQuery lib to save code, but it is easy to create this code without jQuery. Supposed you have html elements (i.e. textareas) with ids "my_id1" and "my_id1", that you wish to get a tinymce for all you need to do is:
var config_tinymce_1 = {
plugins :"save",
theme_advanced_buttons1 : "bold,italic,underline,save",
theme_advanced_buttons2 : "",
...
};
var config_tinymce_2 = {
plugins :"save",
theme_advanced_buttons1 : "save",
theme_advanced_buttons2 : "",
...
};
$(document).ready(function(){
init_obj_1 = {element_id:'my_id1', window: window};
$.extend(true, init_obj_1, config_tinymce_1);
tinyMCE.execCommand('mceAddFrameControl',false, init_obj_1);
init_obj_2 = {element_id:'my_id2', window: window};
$.extend(true, init_obj_2, config_tinymce_2);
tinyMCE.execCommand('mceAddFrameControl',false, init_obj_2);
});

Categories