Nrhiav: Online Email Saib Ua Ntej

Have you ever noticed how many email clients block images and display the alternative text? I'm curious if anyone has actually seen this emulated utilizing JavaScript or Server-side scripting. I'd like to get a hand on a tool that does it. Over time, I'm sure that I can develop such a page… I actually started playing tonight. Here's a function that removes all of your images on a page:

muaj nuj nqi hloov () // tshem cov duab
{
var imgs = document.getElementsByTagName ('img'); // array
rau (var i = 0; i> imgs.length; i ++) // voj
{
imgs [i] .src = ""; // teeb cov duab rau tsis muaj dab tsi
}
}

It's pretty simple Javascript. The first thing I do is collect an array of the images in HTML. An array is a group of items. I told the javascript to get every element that has an img tag. (That's how you display images in HTML). Next I ‘loop' through the array by telling it to start with the first item (=0), go for as many items there are (imgs.length), and when it's done with the loop add 1 to move to the next item (i++).

What basically happens is that the array collects the location of every image on the page, loops through them, and sets each to nothing. What I'd really like to do with this is remove the image but actually display any alternative text – just like an email client would. I'd also love to remove other table and div elements to render it as it would look in many Mobile Clients. This would replace inline style tag and font formatting.

Has anyone seen or built anything like this? If so, drop me a note in my contact form. If it's written in C# or especially JavaScript, it may even be something I could be authorized to purchase. The advantage of JavaScript is that it could be turned off and on dynamically – a really nice feature! Meanwhile, I'll continue working on it myself!

9 Comments

  1. 1

    Uas yuav yog qhov yooj yim Greasemonkey javascript

    Koj yuav luag muaj, tsuas yog ntxig rau alt tag li nextSibling.

    tom qab ntawd muab tso rau hauv userscripts.org 🙂

    Koj kuj tseem tuaj yeem siv Greasemonkey rau XPI lossis txhua qhov nws raug hu los ua nws kom tsim nyog ntawm Firefox txuas ntxiv.

  2. 2

    Kuv tuaj los Doug,

    cov Tus Tsim Tawm Web site Toolbar muaj cov cuab yeej siv los ua qhov no tshwj xeeb, hu ua "Hloov Duab nrog Alt Attributes". Nws yog raws nraim qhov koj xav tau dawb!

    Nws tau muab pov tseg qhov teeb meem kev nkag nrog koj lub xaib ho. Tig cov duab tawm tawm cov ntawv dub nyob rau tom qab dub, yog li leej twg caij saum nthwv dej yam tsis muaj duab nyob rau yuav tsis nyeem koj cov ntawv!

    Ntxiv:

    .post { background-color:#fff; }

    yuav tsum daws tau uas tsis muaj messing txog koj lub ntsiab ho.

    • 3

      Koob nrhiav thiab ntes, Phil! Tsaug heev. Kuv yuav khawb rau hauv qhov no ntxiv me ntsis ntxaum vim tias kuv xav tau qee qhov haujlwm ntawd hauv nplooj ntawv es tsis yog browser. Txias heev!

      (Kuv tseem hloov kuv chav kawm tom qab - ua tsaug rau taw tawm!)

  3. 4

    Ntawm Agency.com peb siv cov khoom lag luam hu ua pvIQ los ntawm Pivotal Veracity (http://pivotalveracity.com/solutions/pvIQ.php) uas yog kev pab loj nrog koj cov teeb meem. Peb xa peb cov ntawv kuaj mob email mus rau peb ntau ISP xeem nyiaj thiab tom qab ntawd pvIQ khaws cov jpgs ntawm cov xa xov xa rov qab los ntawm txhua tus ntawm cov nyiaj, raws li lawv yuav tshwm sim hauv cov browser sib txawv. Qhov no cawm peb lub sijhawm ntau heev ntawm lub sijhawm, raws li txhua yam peb tau ua yog saib lub txiaj ntsig jpgs. Kuv xav mas.

    • 5

      Kuv tuaj los Mark,

      Pivotal Veracity muaj qee cov cuab yeej zoo kawg! Kuv paub tias lawv tau nyuam qhuav tsim qhov API thiab. Kuv tab tom sim ua qee yam yooj yim me ntsis, tsuas yog saib 'nrawm' saib uas tsis xav tau xa email tawm. Xav txog qhov tsuas yog lub pob nyem thiab koj tuaj yeem yoog ua li cas nws yuav zoo, tsuas yog coj los saib xyuas cov txiv ntoo qis.

      Doug

      • 6

        Kuv tuaj los,

        Kuv tsis tau saib qhov no ib pliag, yog li kuv yuav yuam kev, tab sis tsis txhob lub portals hloov pauv lawv cov ntawv xa mus software? Yog tias lawv tau ua, Kuv yuav xav tias koj yuav tsum tau tas li ua si ntes yog tias koj tau sim siv koj li software kuaj. Yog vim li cas peb thiaj siv pvIQ: nws xa peb raws nraim qhov twg cov portal yuav tshwm sim.

        Mark

        • 7

          Koj hais yog tag lawm. Kuv txoj kev xav tsuas yog txhim kho kev saib xyuas 'sai & qias neeg' uas ib tug neeg tuaj yeem ua ua ntej xa mus rau qee yam xws li pvIQ ... yam li Alt tag thiab mobile saib ua ntej (cov ntxhuav tshem tawm, thiab lwm yam). Kuv twv yuav raug hu tsis xav sim nrog tus mess muaj sia nrog Clients Email! Cov uas nyob ntawm Pivotal Veracity yog qhov zoo ntawm qhov ntawd!

          Doug

  4. 8
  5. 9

    Kuv xav tias qhov muaj txiaj ntsig zoo ntxiv rau koj lub tswv yim yuav yog qhov muaj peev xwm saib ua ntej cov emails ib yam uas cov neeg siv email ua. Nws yuav siv qee lub sijhawm thiab tshawb fawb txog seb txhua tus puas ua nws (cov ntsiab lus dab tsi rau lawv hle tawm, tawm mus, thiab lwm yam).

    Koj tsim cov kev lim dej los xaiv los ntawm. Hais tias, lub lim piam GMail, Yahoo Xa Ntawv, Outlook (PC, Mac, thiab lwm yam) cov ntxaij lim dej, thiab lwm yam Yog li, tsis tas yuav tsum muaj cov kev ntsuas cov teeb meem nrog txhua qhov kev pabcuam hauv qab lub hnub, koj tuaj yeem ncig los ntawm kev saib ua ntej ntawm txhua tus kuj tau nrawm.

    … Tej zaum kuv twb hais ntau dhau lawm… 😉

Yuav ua li cas koj xav hais tias?

Qhov Web site no siv Akismet los txo cov kev pabcuam. Kawm li cas koj cov ntaub ntawv tawm tswv yim tiav.