• krzysztof_hellostudio

    (@krzysztof_hellostudio)


    Hi, im trying to setup a guest form to upload some data and the image.
    ive got proble with implementing pushing the image through ajax to php.

    the form can bo found here
    http://hellostudio.eu/clients/zagrodowy/dodaj-przepis/

    and the code so far

    var post = {
                author : $js('#imie').val(),
                email : $js('#email').val(),
                title : $js('#title').val(),
                category : $js('#category').val(),
                timeCat : $js('#time').val(),
                image : $js('#thumbnail').val(),
                content : $js('#rec_content').val(),
                tags : allTags
            };
    
            $js.ajax({
                        url : "/clients/zagrodowy/wp-admin/admin-ajax.php",
                        type : 'POST',
                        data : 'action=receipe_submit'+
                        '&author='+post.author+
                        '&email='+post.email+
                        '&title='+post.title+
                        '&category='+post.category+
                        '&time='+post.timeCat+
                        '&image='+post.image+
                        '&content='+post.content+
                        '&tags='+post.tags,
    
                        success : function(results) {
                            //alert(results);
                            $js("#add-receipe").slideUp('slow');
                            $js("#response").html('<h2 class="thanks">Dziękujemy za dodanie przepisu!</h2>');
                            Cufon.refresh();
                            //$js('#submit-ajax').removeAttr("disabled");
                            //$js('#submit-ajax').click();
                            // Engine.tabs();
                            // Engine.hovers();
                            // Engine.clicks();
                            // Engine.slider();
                        }
                    });
        })

    maybe someone knows some way around that 🙂

  • The topic ‘Ajax to send image by unregistered user’ is closed to new replies.