Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> JavaScript
Author Message
killing-hours
RavenNuke(tm) Development Team



Joined: Oct 01, 2010
Posts: 438
Location: Houston, Tx

PostPosted: Wed Feb 23, 2011 2:03 pm Reply with quote

Hey all-

Working on getting a script working with my application but I'm running into a snag making a workaround.

Without going to far in depth... this script uploads files via flash and processes a queue doing such. It provides "onComplete" & "onAllComplete" callback functions.

Since the script only processes one file at a time, I can't attach "all" files to the email once it calls back to final processing with "onAllcomplete".

I know... it's confusing.

What I'm trying to learn now if it is possible... is how to store returned data to a variable or array (using jquery) and then pass that variable to my final processing to foreach(attach in the email script.

Point of it would be... since the upload script provides "onComplete" & "onAllComplete" callbacks... once the onComplete callback fires.. it adds the data to the variable/array (building my list) then the "onAllComplete" function will send that full list to the final processing script.

_________________
Money is the measurement of time - Me
"You can all go to hell…I’m going to Texas" -Davy Crockett 
View user's profile Send private message
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Wed Feb 23, 2011 2:35 pm Reply with quote

I only work in jQuery so that is what my possible solution will use. Try taking a look at this: http://api.jquery.com/jQuery.data/

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
killing-hours







PostPosted: Wed Feb 23, 2011 2:37 pm Reply with quote

Palbin wrote:
I only work in jQuery so that is what my possible solution will use. Try taking a look at this: http://api.jquery.com/jQuery.data/


Was just looking at that as you posted this. Wink

I just don't quite grasp how to overcome this issue... but I would imagine it's possible... I'm just not looking for the correct issue or don't know how to phrase the question.


Here is how the onComplete looks right now.

Code:
"onComplete"  : function(event, ID, fileObj, response, data) {

      var fName1 = fileObj.name;
      var fPath1 = fileObj.filePath;
      var fType1 = fileObj.type;
         if($("#fileN1").val() == "0") {
            $("#fileN1").val(fName1);
            $("#fileP1").val(fPath1);
            $("#fileT1").val(fType1);
            alert("File1");   
         }      
      alert("Completed");
    },


So what it does... is get the required information and store them in vars (then writes to input as it stands now)... but I "should" be able to store those in arrays and pass them on somehow.

Theoretical:

those "vars" would be like

var array1[] = fileObj.name;

etc etc. Then pass the array on to the final script. Thanks for the reply Palbin... I'll keep diggin. Wink

------

Future seekers.... "JSON" is the way. Wink
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> JavaScript

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©