A vexing coding technique/trick I seem to have missed
In some e-mail newsletters I get there is a link withing the e-mail (not in the e-mail client but the newsletter) that states something like "Can't see the images below? Click here." When clicked, the images appear.
Anyone know how that is done?
Thanks!
ChromeFoundry
(3,270 posts)potential spam and tracking images. The link is usually a call to a piece of JavaScript code that will replace the "src" attribute value on the "img" tags with the original URL. When the page loads, it usually filters the "src" attributes to load a semi-transparent gif image, hosted by your ISP.
An example of this would be if I had an image in my signature line that would load form my server. I would then be able to track every IP address that read my posts.
Since scripting is blocked on the DU servers, I cannot add additional specific information, such as your ID to the request...
Example:
[blockquote class="red"]< img src=" http :// someplace.com/someimage.gif?ID=wyldwolf " />
But, If I sent you an email and the contents of the message contained...
Example:
[blockquote class="red"]< img src=" http: // someplace.com/someimage.gif?ID=wyldwolf723%40domain.com " />
...then I would know that the spam message I sent you - 1) made it to a valid email address. 2) You read the email message.
Now, your address is added to a database to be sold to hundreds of other people trying to sell you Viagra, porn, Russian brides...
so, to answer your question... if you had the following HTML img tag, you could swap the src of the image like this:
< script >
function changeImage()
{
document.getElementById('8675309').src=' http: // someplace.com/image.gif ';
}
< /script >
< button ="changeImage();"> Can't see the Image? Click here! < /button>
< img id="8675309" src=" http: // your-isp.com/blank.gif " width="30" height="20"/>
Hope that makes sense...
wyldwolf
(43,891 posts)I'll see if it works for me.
ChromeFoundry
(3,270 posts)If you get stuck... you know where to find help.
Just so you are aware: It's kind of difficult to format HTML and Scripts in this new DU; a lot of extra spaces are needed so the Post sanitizer ignores the tags... so be patient in waiting for a response from the others.
If DU supported the < code > and < pre > tags, life would be much easier.
Phillip McCleod
(1,837 posts)it's especially annoying when trying to share python code since.. uh.. white space is god.
i imagine the 'computers & internet' forum would be more appealing to the very many, very liberal coders out here with that one tiny addition.
plus, i don't doubt there's an unchecked check box for it in the 'permitted tags' field of the admin section of this site. just try including <code> in the reply title and you'll see what i mean. no problem there. it's just in the body of the post, where i might actually want to *use* it that it's prohibited.
yeh that makes sense.
nebenaube
(3,496 posts)%20
substitution. pain in the ass but it would work.
Response to wyldwolf (Original post)
JacqulynBillman Message auto-removed