I have two custom modules X and Y. I want to make an AJAX call in Editview
of Y Module which have unique value common Text field with X module. So when should I add value in Y module it should check in database where this record is checked with primary option or not in X module and returns "true" or "false"?
I have written an on-change function for this in view.edit.php
of Y module but seems to not be working.
Here is my code:
//view.edit.php
<script type="text/javascript">
function icueid_onchange (){
var connectionObject = YAHOO.util.Connect.asyncRequest (“GET”, “getid.php”, callback);
YAHOO.util.Event.onContentReady(“EditView”,function () {ldelim} initEditView(document.forms.EditView);
initCall();
{});
}
</script>
and in editviewdef
of Y module, I have the following code:
array (
'name' => 'primary_book_i_cue_id',
'label' => 'LBL_PRIMARY_BOOK_I_CUE_ID',
'displayParams' =>
array (
'field' =>
array (
'onchange' => 'icueid_onchange();',
),
),
while Loading window in console, I am getting
"SyntaxError: illegal character"`
where the arrow pointed towards 'GET'.
I am a beginner in AJAX request. So please take me to the corner.
</div>