0

I'm trying to use timthumb to dynamically resize an image using jQuery ajax:

load_link = "/images/timthumb.php&src=" + link + "&h=194&w=263";
    /* /images/timthumb.php&src=http://farm4.static.flickr.com/3631/5836439169_2230db5e6d_m.jpg&h=194&w=263 */

    $.get(load_link, updateLink);

    function updateLink(data) {
        $('#flickr-first-photo').attr('src',data);
    }

But I'm getting no response back from the ajax call. Does anyone know if this is even possible with timthumb?

2 Answers 2

1

probably because the URL is not valid. Try to use this:

load_link = "/images/timthumb.php&src=" + encodeURI(link) + "&h=194&w=263";
Sign up to request clarification or add additional context in comments.

1 Comment

That might improve the link coding but still zero response from the php script
0

This worked:

load_link = encodeURI("&src=" + link + "&h=194&w=263&marko=1");
$.get('/images/timthumb.php', load_link, updateLink);

function updateLink(data) {
    $('#flickr-first-photo').attr('src',data);
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.