Help monitoring 'value' attribute of invisible element

I’m trying to monitor the value attribute of an invisible element on an(y) Amazon item page (in addition to a few text elements, I have that part covered). It should be very similar to How to track changes to anchor tag's href, which I’ve read multiple times, but I’m still having a hard time adapting it to my needs and getting it to work. The javascript for what I’m looking to monitor is below, I’ve also provided a target webpage, can anyone please help me with this?

document.getElementById(‘ASIN’).getAttribute(‘value’)

On this particular page the value attribute of this element should be B07PXGQC1Q

Following JavaScript should work using jQuery:

$('body').text($('#ASIN').attr('value'))

I’m still getting the same error I was getting yesterday, the visual selector page is returning [object Object] and the monitor shows an EXCEPTION error saying callback is not defined. Can you please post the full config that you got to work for this?

There was a problem with quotes that hadn’t noticed earlier. Note that difference between in quotes in the following two lines:

document.getElementById(‘ASIN’).getAttribute(‘value’)
$('body').text($('#ASIN').attr('value'))

I updated the post to use the correct quotes. Can you try again?

yep that was it, thank you

1 Like

Great, thanks for the update!