hello!

Still trying to get my uploader plugin on track. 
I would like to implement a feature that replaces the uploader flash file by a 
text input field containing the uploaded file's name. 

So the process so far is this:

- replace "file" input fields by a flash uploader
- when upload is done, replace flash uploader by a "text" input field.



The problem i have is that i don't know how to address the file input field 
that was replaced by the flash file, from within the function.  The error 
message is "this.parentNode has no properties". I gather its the $this.after() 
line that creates the issue.

Here is the relevant part of my plugin code so far


---  ---
jQuery.fn.jqUploader = function(options) {
        return this.each(function(index) {
                var $this = jQuery(this);
                var myUploadScript = $(this.form).attr("action");
                $(this.form).submit(function(){return false});
                $("[EMAIL PROTECTED]'submit']",this.form).hide();
                var cls = (this.className !='') ? this.className: 'jqUploader';
                replaceFlashByInput = function(filename,varname){
                        $field = jQuery('<input name="'+varname+'" type="text" 
id="'+varname+'" value="'+filename+'"/>');
                        $this.after($field).remove();
                }
        // more code here...
        });
 
});
 
 
 thanks !!

Alexandre

-- 
Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.441 / Base de données virus: 268.17.36/681 - Date: 11/02/2007 18:50
 


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to