dynamic response function for Uploadify
Opening
I have several forms (in this case two) that are located in tabs using Ext-JS.
I also have jQuery framework which I use for main javascript script/programming. last is an Javascript object global instance(single) that holds state.the instance called obj have properties of:
obj.fileID; obj.manID; obj.womenID; method 1. now I issue a post to the DB with fileID and using it's response i make a new object. that holds current file,women and man IDs. 2. after that I want to upload a file (an image in this case). using Uploadify I bind开发者_如何学C to an input element of file type.I wanted to either update scriptData when building that new object.
or catch the onComplete and use that. there I want to issue another post to the PHP file that will update the DB for location of the file uploaded problemstarted when the non-visible input tag could not be updated.
because flash had to loaded again.I don't mind using a different flash uploader but I request a solution for this problem.
Arye.
It sounds like you are hiding the SWF. In FF and WebKit, if you do a display:none on a SWF, then display:block (or whatever) the SWF reloads. And I don't think it's something that will change.
If you need to hide the SWF move it off the page with something like: left:-9999px
Also, I'm sure swfUploader allows you to post variables along with the file. So perhaps this can be done in one call.
You can use CSS to hide it.
visibility:hidden;
left:-9999px;
Any of these should work, display:none
will make it inactive on the DOM in most cases, so it's best to avoid using it when you need to update the element.
Option #1 - Will not effect positioning on the DOM
position:absolute;
left:-9999px;
Option #2 - Also will not effect positioning on the DOM.
position:absolute;
visibility:hidden;
Option #3 - Will effect position on the DOM.
margin-left:-9999px;
or
visibility:hidden;
精彩评论