I am going in circles here. I have a URL properly saved in a cookie. When I try to replace the src of an image, it does NOT work. Of course, if I place set the URL directly it works.
//Example 1 - does not work
let sPhoto = session . getItem ( “myimage” )
$w ( “#img” ). src = sPhoto
//Example 2 - does not work
let sPhoto = ‘"’ + session . getItem ( “myimage” ) + ‘"’
$w ( “#img” ). src = sPhoto
//Example 3 - works
let sPhoto = “https://somewebsite.com/myimage.jpg”
$w ( “#img” ). src = sPhoto
I can properly print out session . getItem ( “myimage” ) to the screen, so it is 100% being set and retrieved properly. I’ve tried encoding the URI before saving to the cookie, then decoding it, I’ve tried .toString() even though it is a string. I am completely stumped. Any thoughts?
Thank you!