All pastes #247282 Raw Edit

Unnamed

public text v1 · immutable
#247282 ·published 2006-11-13 07:04 UTC
rendered paste body
function sndLead(action,teacher_id,job_id)
{

        var http = createRequestObject();

        var job_type_id = '';
        var match_id = teacher_id+'-'+job_id ;

        // work around for the bottleneck at the str variable...
        if ( action == 'sent_match_delete_recruiter' )
        {
                job_type_id = 'recruiter_jobs_id';
                action = 'sent_match_delete';
        }
        else if ( action == 'sent_match_delete_school' )
        {
                job_type_id = 'school_jobs_id';
                action = 'sent_match_delete';
        }
        else if ( action == 'sent_match_recruiter' )
        {
                job_type_id = 'recruiter_jobs_id';

        }else if ( action == 'sent_match_school' )
        {
                job_type_id = 'school_jobs_id' ;
        }

        // find the teacher match notes
        var teacher_match_arr=getElementsByClass(match_id) ;
        var teacher_match_notes = teacher_match_arr[0].value;

        str = action+'=1'+'&teacher_id='+teacher_id+'&'+job_type_id+'='+job_id+'&teacher_match_notes='+teacher_match_notes; \

        url = 'http://www.EnglishTeachingKorea.com/control_panel.php';

        // send off the post request
        http.open("POST",url,true);
        http.onreadystatechange = handleResponse;
        http.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");

        http.send(str);

        // disappear the box
        dis_text = teacher_id+'--'+job_id;

        ret_val = new Array();
        ret_val = getElementsByClass(dis_text);

        for( var i = 0 ; i < ret_val.length ; i++)
        {
                ret_val[i].style.display='none';
        }

}