positioning problem
positioning problem
bennyutzer
Posts: 2Questions: 0Answers: 0
hello everyone,
i've got a problem which some of you might call a "n00b problem", but the api failed to provide me with a solution, and as i was unable to find a "search function" in the forum's section, i've got no alternative besides posting this right here.
in the api there's a special section for positioning the elements of datatables inside ones own web design. and in this section it is explained, that one can put the various elements, which are created by datatables automatically, into different, user-defineable sections on the web page.
what i wanted to try is to put the table into one and the filter into another . i realized that this is done by the "sDom" command, but i was unable to do it the way i like to have it. i was able to tell the datatables-object to create 2 divs, give it some id and put the parts of the datatable-output into it, but i was not able to do this with divs that already existed on the webpage. it worked only, if datatables created new divs, which does not help me very much.
i would be very happy, if someone here could give me guidance as to how my problem is solved. and i also apologize in advance, if this issue has already been discussed here.
here's my code:
[code]
$(document).ready(function() {
$('#example').dataTable({
"sDom": '<"#one"><"#a"t><"#two"><"#b"f>',
"bPaginate": false,
"bLengthChange": false,
"bFilter": true,
"bSort": false,
"bInfo": false,
"bAutoWidth": false
});
} );
abc
def
animals
Horse
Dog
Whale
Cat
Rat
[/code]
in that code, you will find 2 divs, id-ed with "one" and "two". the sDom-command is
[quote]
"sDom": '<"#one"><"#a"t><"#two"><"#b"f>'
[/quote]
which i hoped would create the output i would like to see, but it does not.
i would like to see the at first (the one with the red border), then a new which contains the table, then the (the one with the green border), and finally another new containing the filter. but all i get is the divs one and two, and then the datatables-parts.
is there any way, my vision can brought to life, or not? how can i put datatables-output-elements into predefined divs? What am i doing wrong?
thanx for any help, and again apologies if this is not the right place or the right time to ask this.
greets
benny
i've got a problem which some of you might call a "n00b problem", but the api failed to provide me with a solution, and as i was unable to find a "search function" in the forum's section, i've got no alternative besides posting this right here.
in the api there's a special section for positioning the elements of datatables inside ones own web design. and in this section it is explained, that one can put the various elements, which are created by datatables automatically, into different, user-defineable sections on the web page.
what i wanted to try is to put the table into one and the filter into another . i realized that this is done by the "sDom" command, but i was unable to do it the way i like to have it. i was able to tell the datatables-object to create 2 divs, give it some id and put the parts of the datatable-output into it, but i was not able to do this with divs that already existed on the webpage. it worked only, if datatables created new divs, which does not help me very much.
i would be very happy, if someone here could give me guidance as to how my problem is solved. and i also apologize in advance, if this issue has already been discussed here.
here's my code:
[code]
$(document).ready(function() {
$('#example').dataTable({
"sDom": '<"#one"><"#a"t><"#two"><"#b"f>',
"bPaginate": false,
"bLengthChange": false,
"bFilter": true,
"bSort": false,
"bInfo": false,
"bAutoWidth": false
});
} );
abc
def
animals
Horse
Dog
Whale
Cat
Rat
[/code]
in that code, you will find 2 divs, id-ed with "one" and "two". the sDom-command is
[quote]
"sDom": '<"#one"><"#a"t><"#two"><"#b"f>'
[/quote]
which i hoped would create the output i would like to see, but it does not.
i would like to see the at first (the one with the red border), then a new which contains the table, then the (the one with the green border), and finally another new containing the filter. but all i get is the divs one and two, and then the datatables-parts.
is there any way, my vision can brought to life, or not? how can i put datatables-output-elements into predefined divs? What am i doing wrong?
thanx for any help, and again apologies if this is not the right place or the right time to ask this.
greets
benny
This discussion has been closed.
Replies
i would like to know, if it's possible to put the elements created by datatables into specific, pre-existing html-elements, like divs. if i got two divs on my webpage, and i want the table to be put into one div and the filter textfield into the other div, how can i do that?
thanx for any help
benny