WebSite X5Help Center

 
Hanafi Salman
Hanafi Salman
User

How to Auto resize tableobject X5 (cell to fit the text size)  en

Автор: Hanafi Salman
Просмотрено 870, Подписчики 2, Размещенный 0  

Need help.. @Daniel gave me the solution for filter search modified code from w3schools using Table object X5..
If purely I am using TableObjectX5 independently, text in a cell column that exceeds the number of words does not automatically change into wrap text to fit view for smartphones

The comparison is below:

test page > https://ica.web.id/daftartel2.html
using TableObject WebsiteX5
The column is as the same size both for desktop and smartphone view, then should be scroll right for smartphone view

test page > https://ica.web.id/daftartel3.html
using manual input in HTMLObject websiteX5
The column automatically resize and the word wrapped for smartphone view

Thanks anyway..

Размещено
8 Ответы - 4 Полезно - 1 Корректно
Hanafi Salman
Hanafi Salman
User
Автор

screenshot:

  

Читать больше
Размещено От Hanafi Salman
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

...it doesn't search columns...
...to make the table elastic, you can use this old idea of ​​mine:
<style>table, table *{width:100% !important}</style>

.

Читать больше
Размещено От  ‪ KolAsim ‪ ‪
Daniel W.
Daniel W.
User

Here is the Javascript code that is added below the existing Javascript code.

And the screenshot below shows the result.

-----

</script>
<style> table {word-break: break-word;} </style><script> $( document ).ready(function() { $("table").css("width", "");});

</script>

>> https://helpcenter.websitex5.com/ru/post/253566

-----

Читать больше
Размещено От Daniel W.
Hanafi Salman
Hanafi Salman
User
Автор

Done and it works.. I just know it smile

Thank you so much @KolAsim..

Читать больше
Размещено От Hanafi Salman
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

... that code was always an old invention of mine that became common use, born around the time of v.12...
>>https://helpcenter.websitex5.com/ru/post/78350
...now, even if it's still valid, it's become superfluous for current versions, for which the reduced code I posted earlier is sufficient...
.
bye, ciao

.

Читать больше
Размещено От  ‪ KolAsim ‪ ‪
Hanafi Salman
Hanafi Salman
User
Автор

Wow.. https://helpcenter.websitex5.com/ru/post/78350, since 12 years ago.. this script has become the forerunner and is very useful for people who need it..

I hope that all the solution you provided will be rewarded by God with goodness.

Thanks @KolAsim

Читать больше
Размещено От Hanafi Salman