Picture hidden when table reloaded by jQuery

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
wincode2008
User
Posts: 136

Picture hidden when table reloaded by jQuery

Post 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");


arbei
User
Posts: 9785

Post by arbei »

You may Check HTTP Response and find out why the images are not loaded.


wincode2008
User
Posts: 136

Post 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?


arbei
User
Posts: 9785

Post by arbei »

wincode2008 wrote:

The CSS and attributes of the images have been remove..

For example?


wincode2008
User
Posts: 136

Post 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");

arbei
User
Posts: 9785

Post by arbei »

You may read jQuery .load() docs, see the Script Execution section.


Post Reply