开发者

jQuery live, get value, uploadify don't work!

开发者 https://www.devze.com 2023-01-23 20:44 出处:网络
I after some ajax stuff I put some number into input fi开发者_C百科eld ,and when I try to get that field to paste it in uploadify as script data, it paste empty string, but if I type same value in inp

I after some ajax stuff I put some number into input fi开发者_C百科eld ,and when I try to get that field to paste it in uploadify as script data, it paste empty string, but if I type same value in input field and that try to paste field in uploadify as script data, than works normally.

How to make some live event, or something, to make uploadify pull input that is set on ajax success?

here is the code for script data :

scriptData      : {'page_id' : $("#page_id").val()},

and on ajax success

$("#page_id").val(data.pid);

and input type

<input type="text" id="page_id" name="page_id" value="" />

When I type manual in textbox same value,it works,but when I do not type,uploadify do not send data to php file,problem is with text field that is set on ajax success,don't know how to solve this.


function updateData(){
             $("#uploadify").uploadifySettings('scriptData',{'first' : 'first','page_id' : $("#page_id").val()});
}

and I call this function on onSelect.

Tnx guys,sorry


Not sure if this is what's happening, but there is an issue with synchronicity and some of the events. If you try to update scriptData using the onOpen, onSelect, or onSelectOnce functions, the scriptData won't send with the upload. You'll need to update the scriptData using a separate js function before you trigger the upload.

0

精彩评论

暂无评论...
验证码 换一张
取 消