How can I hide DTE_Processing_Indicator?
How can I hide DTE_Processing_Indicator?
rshun
Posts: 44Questions: 9Answers: 0
I use dependent() API for my dropdown.
When I use
editor.dependent('Unit', '@Url.Action("UnitsOption")');
DTE_Processing_Indicator show and flashing. I want to hide it.
I try css
div.DTE_Processing_Indicator {
display: none;
}
not working?
Then I try adding callback(true) at the end from http://live.datatables.net/vejolizo/1/edit
editor.dependent('Unit', function (val, data, callback) {
$.ajax({
url: '@Url.Action("UnitsOption")',
dataType: 'json',
success: function (json) {
callback(true);
}
});
})
Nothing show up in my dropdown.
Please help me.
Rick
Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi Rick,
should be all that is needed. The processing icon will show up while the Ajax process is happening (to let the user know something is happening) and then hide when the process completes.
If that isn't happening, something is wrong somewhere. What is the response from the server? Also, are there any errors shown in your browser's console?
If you can link to the page you are working on I can debug it.
Regards,
Allan
I can show you UnitsOption
I guess because I don't call database.
Something like using [var db = new Database()] to fetch data. That is why processing icon show up (don't know ajax process complete).
Rick
Allan is asking you to use the browser's network inspector to look at the response.
He also asked if you are getting errors in the browser's console.
The client doesn't know, nor care, if you are using a database or just returning data. If the processing doesn't hide then there is an error in the response.
Kevin
This is no error in the browser's console.
Did you look at the response using the browser's network inspector?
Kevin
Yes. It is keep calling UnitsOption.
Do you mean its in an infinite loop?
Is there anything in the Response tab? Please post the response here.
Kevin
In Google Chrome,
In Firefox,
As Allan asked, are you able to link to your page so we can debug it?
Colin
That website is located in internal network. External do not have access to it.
I also can provide the remain code
I don't see any error message in console.
Can you show me the response from the server please? Click on one of the items in the Network inspector and then "Response" to see what the server is sending back.
Thanks,
Allan
This json back from my server when I call
editor.dependent('Unit', '@Url.Action("UnitsOption")');
https://editor.datatables.net/reference/api/field().processing()
I check online documentation. I can use
editor.field('input1').processing(false);
to hide DTE_Processing
How can I use editor.field('input1').processing(false); when I call editor.dependent('Unit', '@Url.Action("UnitsOption")');
Hi all,
I know what is wrong with my code. I need to call
editor.dependent('Site', '@Url.Action("UnitsOption")');
instead of
editor.dependent('Unit', '@Url.Action("UnitsOption")');
Sorry! For the silly mistake. Thank you everyone to help me out.
Rick
Hi Rick,
Many thanks for posting back with what you've found. Good to hear you've got it working now!
Regards,
Allan