I want to use sqs_object created in php file on my tpl file.

This is how i have created the sqs_object in my .php file,

require_once('include/QuickSearchDefaults.php');
$qsd = new QuickSearchDefaults();

$sqs_objects = array('partner_name' => array(
// the method on to use on the JSON server
'method' => 'query',
'modules' => array('Accounts'), // modules to use
'field_list' => array('name', 'id'), // columns to select
'populate_list' => array('partner_name', 'partner_id'), // id's of the html tags to populate with the columns.
'conditions' => // where clause, this code is for any account names that have A WORD beginning with ...
array(array('name'=>'name','op'=>'like_custom','en d'=>'%','value'=>''),
array('name'=>'name','op'=>'like_custom','begin'=> '% ','end'=>'%','value'=>'')),
'group' => 'or', // grouping of the where conditions
'order' => 'name', // ordering
'limit' => '30', // number of records to pull
'no_match_text' => $app_strings['ERR_SQS_NO_MATCH'] // text for no matching results
));

$json = getJSONobj();

$quicksearch_js = $qsd->getQSScripts(); // they are defined in QuickSearchDefaults.php

$quicksearch_js .= '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '</script><script type="text/javascript" src="include/javascript/sugar_3.js">';


$this->javascript = new javascript();
$this->javascript->setFormName('pssQuickCreate');

$focus = new PSS();
$this->javascript->setSugarBean($focus);
$this->javascript->addAllFields('');
$this->javascript->addToValidateBinaryDependency('partner_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . "partner name", 'false', '', 'partner_id');
//$this->ss->assign('additionalScripts', $this->javascript->getScript(false));
$this->ss->assign('JAVASCRIPT', $quicksearch_js);

echo $this->javascript->getScript();

$popup_request_data = array(
'call_back_function' => 'set_return',
'form_name' => 'pssQuickCreate',
'field_to_name_array' => array(
'id' => 'partner_id',
'name' => 'partner_name',
),
);
$this->ss->assign('encoded_partner_acc_popup_request_data' , $json->encode($popup_request_data));


========================

My .tpl file contains following code,
{$JAVASCRIPT}


<td class="dataField" nowrap><slot><input class="sqsEnabled" id="partner_name" name="partner_name" type="text" value="{$PARTNER_NAME}">
<input name='partner_id' id="partner_id" type="text" value='{$PARTNER_ID}'/>&nbsp;<input tabindex='1' title="{$APP.LBL_SELECT_BUTTON_TITLE}" accessKey="{$APP.LBL_SELECT_BUTTON_KEY}" type="button" class="button" value='{$APP.LBL_SELECT_BUTTON_LABEL}' name="btn1"
onclick='open_popup("Accounts", 600, 400, "", true, false, {$encoded_partner_acc_popup_request_data}, "", true);' /></slot></td>



The problem is that it is not populating accounts record in my partner_name field. Please suggest.

Thanks in Advance !!!