Welcome Guest, Not a member yet? Register   Sign In
What about elements added by jquery?
#1

[eluser]macron[/eluser]
Hi
I'm doing this
Code:
->iupload('img','Add image',FALSE,array('class' => 'image'))

and in a js file I'm binding a clickevent to an ancor that injects another input type file so I can add several images via the form
Code:
$(function(){
    $('a.button').bind('click', function(event){
        // add image label and input
        $('<label for="img" class="left">&nbsp;</label>&lt;input type="file" name="img" value="" id="img" class="image"  /&gt;&lt;br />').insertBefore('#last');

        // loop through all input[file] and rename to img1, img2, img3 ...
        $("input.image").attr("name", function (arr) {
          return "img" + arr;
        })
        ;
    });
});

As you can see I'm renaming the input to img1, img2, img3 ... but I never get access to these via
Code:
$this->form->get_post(TRUE);

I only get access to the org img and that one is set to false. That part I do understand as no element is now just name img but img1, img2...

What am I doing wrong here?

Fantastic lib though. Saves me a huge amount of time


Messages In This Thread
What about elements added by jquery? - by El Forum - 11-30-2010, 07:47 AM
What about elements added by jquery? - by El Forum - 11-30-2010, 11:08 AM
What about elements added by jquery? - by El Forum - 11-30-2010, 01:28 PM
What about elements added by jquery? - by El Forum - 11-30-2010, 03:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB