How to add DOM in dynamic ajax stocks datatable ?
How to add DOM in dynamic ajax stocks datatable ?
greetings
Posts: 4Questions: 1Answers: 0
I am trying to add a dynamic ajax datatable for my project. I seleced https://datatables.net/examples/advanced_init/stocks.html this datatable for it. Unfortunately dynamic <input> value is not detecting. I think it is a DOM problem. my code is
return type === 'display' ?
'<input type="text" class="total-amount" value="">' :
val;
I don't know how to add DOM in this dynamic ajax stocks datatable. Please help me..
Answers
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
My project is under development. Now hosted in localhost
I created a post in Stackoverflow :
_https://stackoverflow.com/questions/73742176/how-to-add-dom-number-function-in-ajax-stocks-datatable _.
You can see all details and files from there
I'm not sure why you want to render a text input, for example:
Instead of the input do you not want to see the symbol name? Maybe do something like this:
If this doesn't help then please provide details of what you are trying to do with the text input.
Kevin
Websocket result is only work with <input type="text" id="btc-price" value="">
Also I need to do more functions with <input> development is under progress. Not completed. So DOM with Ajax stocks datatable is required. Can you give me Ajax stocks working code with DOM feature ?
Why's that? You can use
row().data()
to update the data for a row (orcell().data()
for a specific cell) based on the information from the web-socket.Note also that
id="btc-price"
will result in an invalid HTML document, sinceid
must be unique on the page. I'd strongly suggest you remove theid
attribute.Development of a custom example like this is something that we would provide with our support package.
Allan