Valueis derived from this table when a row is pressed:
<script>
var link_base = "<?php echo bloginfo('template_url').'/savelabel/'; ?>" ;
var img_name = $('#imgdiv').text();
$('#imgid').attr('src', link_base + img_name);
</script>
<div class="bx2">
<img id="imgid" alt="" class="imgsty" />
</div>
The selected file name is displayed in the div:
<div id="txtdiv"></div>
And inside html there is an image tag in which I want to pass the value div(i.e. the name of the image file) src=""in the img tag.
The code I'm trying to achieve is shown below:
<script>
var link_base = "<?php echo bloginfo('template_url').'/savelabel/'; ?>" ;
var img_name = $('#imgdiv').text();
$('#imgid').attr('src', link_base + img_name);
</script>
<div class="bx2">
<img id="imgid" alt="" class="imgsty" />
</div>
source
share