Hi, I don't understand what they doing in line 3, I did not know one can create object in javascript. and then why they have return with in if statament?
function package_validate()
{
if ($('package_offer_id').value != "" && valid_offer == false)
{
var url = '/integration/ajax_validate_offer_id';
var pars = 'offer_id=' + $('package_offer_id').value;
var myAjax = new Ajax.Request( url, {method: 'get', parameters: pars, onComplete: validate_offer_id} );
return;
}
submit_package();
}
function package_validate()
{
if ($('package_offer_id').value != "" && valid_offer == false)
{
var url = '/integration/ajax_validate_offer_id';
var pars = 'offer_id=' + $('package_offer_id').value;
var myAjax = new Ajax.Request( url, {method: 'get', parameters: pars, onComplete: validate_offer_id} );
return;
}
submit_package();
}