hi guys, anybody know how to code/add manually the ajax reloading process on normal ajax event onChange instead of using the ajax processing option that sc provide withing the field options? i’m having multiple ajax processing roles and making conflict causing the message “processing…” keep looping infinite… so if i can do it manually from ejax > onChange event may get rid of this
But what’s this problem? If you don’t solve this problem, coding it manually will have same results.
You can bind change events using JQuery (ex, onChange: http://api.jquery.com/change/) but I think it’s not worth. Maybe it’s better to find a workaround to your specific issue.
yes Giu you are right, but it is getting more complicated
let me explain, i have form in multiple records mode - using update mode only…
in each row i have 8 select fields … {select1}, {select2}, {select3}, {select4}, {select5}, {select6}, {select7}, {select8}
each one of these fields has different values, and each one gettings its value from primary table (foreign + primary keys) - all fine till now…
i want if select8 is changed, then all these selects become default value (in my case, i let all options start with ID 0 so i will have them 0 before saving to db… that is fine
but i want also if i select1 onChange, to make select8 become “0” ---- so in this case, if i chose ajax processing for select1 and make that select8 changes… there is a conflict, and the ajax prossing… message is keep looping… although, value is changed as i want and works fine… but that message processing… is annoying…
wish you understood my case and you get me some nice idea to apply
[QUOTE=itsme3;24464]yes Giu you are right, but it is getting more complicated
let me explain, i have form in multiple records mode - using update mode only…
in each row i have 8 select fields … {select1}, {select2}, {select3}, {select4}, {select5}, {select6}, {select7}, {select8}
each one of these fields has different values, and each one gettings its value from primary table (foreign + primary keys) - all fine till now…
i want if select8 is changed, then all these selects become default value (in my case, i let all options start with ID 0 so i will have them 0 before saving to db… that is fine
but i want also if i select1 onChange, to make select8 become “0” ---- so in this case, if i chose ajax processing for select1 and make that select8 changes… there is a conflict, and the ajax prossing… message is keep looping… although, value is changed as i want and works fine… but that message processing… is annoying…
wish you understood my case and you get me some nice idea to apply :)[/QUOTE]
Can you paste the onChange events of {select1} and {select8}?
nothing, i just enable the onChange ajax reload on select8 to reset all other fields in the row from select1 to select7 (all of them)
and i have another one on select1 to reset the value of select8 alone, so it is a conflict and the message “Processing…” is keep looping, which is reasonable as i have one changes the other, i guess… but i want to get rid of it
[QUOTE=itsme3;24469]nothing, i just enable the onChange ajax reload on select8 to reset all other fields in the row from select1 to select7 (all of them)
and i have another one on select1 to reset the value of select8 alone, so it is a conflict and the message “Processing…” is keep looping, which is reasonable as i have one changes the other, i guess… but i want to get rid of it[/QUOTE]
Right now I’m far from a Pc,did you tried doing updates manually at.onchnge events.
Maybe not the best.idea (not a good.hour now) but the idea is. A method with the logic of.all field.updates,with a conditional with means the field firing the update,and you set global on each onchnge,and fires.this.method. This way,you can detect wich field fires,to not update it. Don know if will work
not really, i don’t know how to do that manually, wish to know really
my need is to make select1 to selet7 all change to default (id=0) is select8 is changed… so i went to select8 field and enabled the function from sc built-in and selected all fields from 1 to 7…
another need is to reload only select8 if select1 is changed… so i went to field1 and enabled the function and selected select8 from sd built-in… and it works… but the message is still processing
Go here http://1drv.ms/1lp4a1n
Import ZIP on your project.
Import SQL on your database.
Run.
New Record, change FK2 to FK8 fields values. Now change Field 1. All fields change.
Now change FK8, field 1 changes.
Check form_prueba_selects configuration fields.
Change fields is managed but changeFieldValues() PHP method on Programming section.
if ([valueChanged]=="fk1") {
{fk2} = 0;
{fk3} = 0;
{fk4} = 0;
{fk5} = 0;
{fk6} = 0;
{fk7} = 0;
{fk8} = 0;
} elseif ([valueChanged]=="fk8") {
{fk1} = 3;
}
[QUOTE=Giu;24524]Go here http://1drv.ms/1lp4a1n
Import ZIP on your project.
Import SQL on your database.
Run.
New Record, change FK2 to FK8 fields values. Now change Field 1. All fields change.
Now change FK8, field 1 changes.
Check form_prueba_selects configuration fields.
Change fields is managed but changeFieldValues() PHP method on Programming section.
if ([valueChanged]=="fk1") {
{fk2} = 0;
{fk3} = 0;
{fk4} = 0;
{fk5} = 0;
{fk6} = 0;
{fk7} = 0;
{fk8} = 0;
} elseif ([valueChanged]=="fk8") {
{fk1} = 3;
}
[/QUOTE]
This works as a magic dude, no need for the built-in ajax reload onChange that comes in field sc field settings…
deeply appreciated your time and help dude
Your problem as I mentioned is because builtin ajax force the onchange, and you entered on a loop without exit.
In this case, an onChange’s field event, don’t fire if field don’t have focus.
Regards.
Absolutely right, I answered above that it worked as magic after your advice
Giu, jsb, Albert, you are legends guys