ajax-upload

How to disable Ajax-upload button?

◇◆丶佛笑我妖孽 提交于 2019-12-13 02:17:56
问题 I'm trying to use this plugin http://valums.com/ajax-upload/. I added a file-limit, I want to disable the upload button (not hide, just disable). E.g. if(filesNumber>=limit) { //Disable the "Upload a file" button } So, if the user will try to upload another file, he should see a message that the limit is exceeded. Can you look at this plugin and help me? The button is not a form button, it is a div with css. var btnUpload=$('#<?=$filesManagerCode?>upload'); new AjaxUpload(btnUpload, { action:

Jquery AjaxUpload plugin doesn't fire onComplete event

浪子不回头ぞ 提交于 2019-12-12 06:28:51
问题 I use Valums AjaxUpload for uploading file in my ASP.NET MVC 3 application . new AjaxUpload($('input.partupload'), { autoSubmit: true, action: '/AdminPanel/Car/UploadPart', onSubmit: function (file, ext) { if (!(ext && /^(zip)$/.test(ext.toLowerCase()))) { $('#hinf').fadeIn('slow'); $('#hinf').html("Please, upload only Zip files!!"); return false; } }, data: { path: directoryPath,parentName : part, carId: @Model.carID, color: color }, onComplete: function (file,response) { var model = file

p:commandButton refreshes entire page instead of partially whereas f:ajax works fine

倖福魔咒の 提交于 2019-12-12 03:37:52
问题 I try to update a part of the page on button click. Right now, I have the following : template.xhtml <h:form prependId="false"> <h:commandButton value="NEWS" action="news"> <f:ajax render="newsContent"></f:ajax> </h:commandButton> <h:panelGroup layout="block" id="newsContent"> <ui:insert name="newsContent"> <ui:include src="/WEB-INF/partials/news/news.xhtml"/> </ui:insert> </h:panelGroup> </h:form> /WEB-INF/partials/news/news.xhtml <h:commandLink action="newsdetails"> <f:ajax render=

Insert custom HTML into Zend_Form

 ̄綄美尐妖づ 提交于 2019-12-12 03:30:05
问题 I have a Zend_Form created from a controller like this: $form = new Zend_Form; $form->setAction('/ad/add')->setMethod('post')->setAttrib('id', 'add_form'); $form->addElement('text', 'name', array( 'label' => 'Name', 'description' => 'Ex.: Samsung Galaxy Tab 10.1', 'validators' => array( 'alnum', 'notEmpty', array('stringLength', array('min' => 3, 'max' => 150)) ), 'required' => true )); $form->addElement('textarea', 'description', array( 'label' => 'Description', 'description' => 'Make sure

Can not use ajax-upload because of ape comet server

不想你离开。 提交于 2019-12-11 10:39:59
问题 First part of description is in Unsafe JavaScript attempt to access frame, when try to upload file with ajax Problem is that I get access denied error, when try to upload file with ajax-way. After long debugging I have discovered that everything is working if I don't load ape client. Ape is comet server http://www.ape-project.org/ Ape creates an iframe with src = "http://8.ape.readbox.cz:6969/?...". If I disable ape and this iframe is not created then I have no problem to access document of

The uploaded image not displayed after ajax upload in chrome

北城余情 提交于 2019-12-10 00:08:31
问题 I did an ajax upload with php.Everything wiil be perfect in firefox. But when i test it in chrome browser its not working correctly. That means it displays this : This is my ajax upload code: $(function(){ var cntUp = 0; var btnUpload=$('#upload0'); var status=$('#status'); var state='left_front'; new AjaxUpload(btnUpload, { action: 'upload-file.php', data: {saleid: $("#hid_saleid").val(),imag_state:state,custom:$('#custom').val()}, name: 'uploadfile', onSubmit: function(file, ext){ if (!

upload file in ajax with wtforms

 ̄綄美尐妖づ 提交于 2019-12-08 02:25:30
问题 I use wtforms to handle forms. so i create form like this: class ProfileForm(Form): firstName = TextField(_('firstName'), [validators.Required(), validators.Length(min=3, max=45)]) lastName = TextField(_('lastName'), [validators.Required(), validators.Length(min=3, max=45)]) avatar = FileField(_('avatar'), [check_file]) this form work in simple upload fine ... but what about ajax ? is there any plugin to create iFrame or somethings to upload file via ajax? or i must handle this form in

Issue with binding in jQuery for copied elements

核能气质少年 提交于 2019-12-08 01:32:34
问题 This is actually a bigger question because I know there are several ways to solve this problem but I will try to sum it up. What I try to do: I am using this jQuery plugin to upload files via Flash http://www.uploadify.com/. However, the element #fileInput that I supposed to bind this function to is a live element which is generated after the page loaded: $('#fileInput').uploadify(). The reason #fileInput is a live element is because I use FancyBox to popup a DIV and this FancyBox basically

upload file in ajax with wtforms

微笑、不失礼 提交于 2019-12-06 13:35:59
I use wtforms to handle forms. so i create form like this: class ProfileForm(Form): firstName = TextField(_('firstName'), [validators.Required(), validators.Length(min=3, max=45)]) lastName = TextField(_('lastName'), [validators.Required(), validators.Length(min=3, max=45)]) avatar = FileField(_('avatar'), [check_file]) this form work in simple upload fine ... but what about ajax ? is there any plugin to create iFrame or somethings to upload file via ajax? or i must handle this form in another way? ps: IE support be important ps2: i use wtform for another without file in ajax to. just by

Issue with binding in jQuery for copied elements

我怕爱的太早我们不能终老 提交于 2019-12-06 12:59:53
This is actually a bigger question because I know there are several ways to solve this problem but I will try to sum it up. What I try to do: I am using this jQuery plugin to upload files via Flash http://www.uploadify.com/ . However, the element #fileInput that I supposed to bind this function to is a live element which is generated after the page loaded: $('#fileInput').uploadify(). The reason #fileInput is a live element is because I use FancyBox to popup a DIV and this FancyBox basically just "cloned" the inner html of the DIV. What happened: When I clicked "BROWSE" to upload a file, there