Attempting to use Javascript to search for the name of an image in my project (passed through repeater item data) and store the objects width in pixels.
I was able to use this code from a different forum post to work:
javascript: $axure.setGlobalVariable(“Ret1”,$axure(’@[[Item.myImageLink]]’).$().find(“img”).attr(“src”));
This successfully finds the image’s src path and outputs: “images/page_1/myImageName_u43.png”
I’m trying to modify this code to get the width of that image - here is my novice attempt:
javascript:alert($axure(’@[[Item.myImageLink]]’).width);
This returns a long-winded function, and I’m sure I have a syntax error for getting the result I’m looking for - any thoughts?