[QUOTE=rajibul;27341]Hi JSB,
or if that, how do I do the php operation with db interaction with that not just showing alert.
[/QUOTE]
Alert() is just an example, you can call your own javascript methods instead.
You canât call php methods, however depending on your needs a solution could be to call a blank application where you can do all your php stuff and redirect back to your form.
onLoadRecord:
{label_field} = â<button type=âbuttonâ onclick=âlocation.href=ââŚ/my_blank_app/my_blank_app.phpââ >Click here</button>â;
To get the row number youâre in is a bit tricky since there is no access to those values, so we need to calculate it with the help of an array.
onApplicationInit:
[rows] = array();
[cur_row] = 1;
// set both variables to Out
onLoadRecord:
[rows][] = {cust_id}; //store the id in the array
onLoad:
[rows][] = 0; //mark the end of the page shown
onNavigate:
[rows] = array_slice([rows],array_search(0,[rows])+1); //reset the array for the new page
You need an Ajax Event (i.e. onClick) on any field (i.e. {custname})
[cur_row] = array_search({cust_id},[rows])+1; // thatâs the row number youâre in
Somewhere in your app:
$focusfield = {custname}.â_â.[cur_row];
sc_ajax_javascript(âscFocusFieldâ,array($focusfield));
There you have it.
jsb