This topic is locked

load image in a list

1/2/2019 9:17:40 AM
PHPRunner General questions
A
ayctech author

hi,

Could you help me, the tutorial(http://asprunner.com/forums/topic/22406-how-to-enhance-lookup-wizard-displaying-an-image-next-to-it/) only shows how it works in a .add, when I want to put it in a list.php when adding the image does not add in the first one but adds in the second one by clicking with the Add new button (see image)


javascrip
$("[id^=value_id_articulo]").on("change", function(){
var $field=$("#lookup_image");

//alert($field);

$field.hide();

$.ajax({

type: 'POST',

dataType: 'json',

data: {value: this.value},

success: function(data){

if (data.success) {

$field.attr("src", data.src);

$field.attr("style", "max-width:100px;");

//uncomment previous line to set up max width of the image

$field.show();

}

}

});

}).change();
snippet
echo "
<img style='display:none' id='lookup_image' border='0'>";

A
ayctech author 1/3/2019

I would appreciate any help administrators <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=86707&image=1&table=forumreplies' class='bbc_emoticon' alt=':unsure:' />

lefty 1/5/2019

location.reload();

A
ayctech author 1/7/2019

location.reload ();
I would load the page again and erase what was charged.

Admin 1/9/2019

I don't think this is easily doable or even possible in Inline Add mode. Definitely will not going to work the way it works in the article as you have no way to add a DIV to the Add page in inline mode.
The only thing that might work is Field Events:

https://xlinesoft.com/phprunner/docs/field_events.htm

fhumanes 1/10/2019

Hello:
Once the table exists, that field of type file-image, I think you could use without problems the option of "autofill" so that when you select a product you also recover the image of it.
Regards,

A
ayctech author 1/10/2019



Hello:
Once the table exists, that field of type file-image, I think you could use without problems the option of "autofill" so that when you select a product you also recover the image of it.
Regards,


in the add form, the file field does not understand that it has to transform to image

A
ayctech author 1/10/2019

what alternative could you give me?