Page 1 of 1
Picture hidden when table reloaded by jQuery
Posted: Wed Sep 11, 2024 5:08 pm
by wincode2008
Dear Experts,
I have a div and table with a field image. I used jquery to reload table and div, it was successful
but the images are hidden. Please help.
here is my code
$("#gmp_tbl_profile").load("TblProfileList #gmp_tbl_profile");
Re: Picture hidden when table reloaded by jQuery
Posted: Wed Sep 11, 2024 5:24 pm
by arbei
You may Check HTTP Response and find out why the images are not loaded.
Re: Picture hidden when table reloaded by jQuery
Posted: Wed Sep 11, 2024 5:28 pm
by wincode2008
The CSS and attributes of the images have been remove.
When I reload or refresh page, it will be fine.. but where jquery reload, the image are missing
How will I resolve it?
Re: Picture hidden when table reloaded by jQuery
Posted: Wed Sep 11, 2024 6:30 pm
by arbei
wincode2008 wrote:
The CSS and attributes of the images have been remove..
For example?
Re: Picture hidden when table reloaded by jQuery
Posted: Wed Sep 11, 2024 8:30 pm
by wincode2008
I found out that after executing the jquery load command, it will duplicate the elements
Before
$("#gmp_tbl_profile").load("TblProfileList #gmp_tbl_profile");
After
$("#gmp_tbl_profile").load("TblProfileList #gmp_tbl_profile");
$("#gmp_tbl_profile").load("TblProfileList #gmp_tbl_profile");
Re: Picture hidden when table reloaded by jQuery
Posted: Wed Sep 11, 2024 10:58 pm
by arbei
You may read jQuery .load() docs, see the Script Execution section.