CountryTrash
Member
Hi Rob,
I have now also tried to put in Plan C
In order to not mess with my Other thread I added a new element (Field) called tender_no to my tender_invitee table.
I then added a calling function to the vendor_id javascript (change action) to see if I get get the tender number to the table in that way.
Can you please see what is the problem with my syntax? for the life of me I cannot seem to see/understand the problem.
It does not update the tender_no field.
I have installed extplorer so you will be able to get to the .js and user_ajax.
Thanks
### vendor_id javascript change action
thetendernumber();
######### 7.js function
function thetendernumber() {
var url = 'http://www.databook.co.za/lptenders/index.php?option=com_fabrik&format=raw&view=plugin&task=userAjax&method=thetendernumber';
var tender_id = form_7.formElements.get('tender_invitees___tender_id').getValue();
new Request({
url: url,
data: {
method: 'thetendernumber', 'tender_id':tender_id
},
onComplete:function(r){
form_7.formElements.get('tender_invitees___tender_no').update(r);
}).send();
};
##### user_ajax function
function thetendernumber() {
$db =JFactory::getDbo();
$tender_id = JRequest::getVar('tender_id', '');
$query = "SELECT tender_number from tenders_register WHERE id = tender_id";
$db->setQuery($query);
$tender_number =$db->loadResult();
echo $tender_number;
}
I have now also tried to put in Plan C
In order to not mess with my Other thread I added a new element (Field) called tender_no to my tender_invitee table.
I then added a calling function to the vendor_id javascript (change action) to see if I get get the tender number to the table in that way.
Can you please see what is the problem with my syntax? for the life of me I cannot seem to see/understand the problem.
It does not update the tender_no field.
I have installed extplorer so you will be able to get to the .js and user_ajax.
Thanks
### vendor_id javascript change action
thetendernumber();
######### 7.js function
function thetendernumber() {
var url = 'http://www.databook.co.za/lptenders/index.php?option=com_fabrik&format=raw&view=plugin&task=userAjax&method=thetendernumber';
var tender_id = form_7.formElements.get('tender_invitees___tender_id').getValue();
new Request({
url: url,
data: {
method: 'thetendernumber', 'tender_id':tender_id
},
onComplete:function(r){
form_7.formElements.get('tender_invitees___tender_no').update(r);
}).send();
};
##### user_ajax function
function thetendernumber() {
$db =JFactory::getDbo();
$tender_id = JRequest::getVar('tender_id', '');
$query = "SELECT tender_number from tenders_register WHERE id = tender_id";
$db->setQuery($query);
$tender_number =$db->loadResult();
echo $tender_number;
}