How would I get this to work – send to post from thick box

The correct way to do this is to:

    $('#upload-background-image-one').click(function() {
        formfield = $('#background-size-one').attr('name');
        tb_show('', 'media-upload.php?type=image&TB_iframe=true');

        // Take the selected image and insert only the src path into the text field.
        window.send_to_editor = function(html) {
            img_url = $('img', html).attr('src');
            $('#background-size-one').val(img_url);
            tb_remove();
        }

        return false;
    });

because when you click on a button you instantiate a call back function you can do everything in that function. Scope is then tied to that fucntion