Page 1 of 1

Trying to read src attribute of img tag

Posted: 2023-02-05 04:33
by dlee
I have this code in one of my hooks files (just using the alert(varImg) for testing). When I delete a record with an image in it, nothing happens. If i can get this to work I'll then try to access the info with php using ajax but first I need this to work. Any ideas what I doing wrong here?
TD

Code: Select all

	function duck_season_2013_after_delete($selectedID, $memberInfo, &$args) {
	?>
		<script type="text/javascript">
			var varImg = $j("#photo-image").attr('src');
			alert(varImg);
		</script>
	<?php
	}

Re: Trying to read src attribute of img tag

Posted: 2023-02-05 08:49
by pbottcher
Hi,

Appgini will call the the display of the table, TV after a delete happend, so your script will not be executed.