PDA

View Full Version : Hiveware Enkoder + external .js = ARRRGGGHHHHH


Stroszek
2004-07-01, 13:49
I use Hiveware's Email Address Enkoder to protect the email addresses on my webpages. Now, on some of the pages, I have the same address more than once. Since the Enkoder spits out a pretty lengthy chunk of code, I thought it would make more sense to put all of the code in an external .js file and then link the page to it. That way, it only has to be downloaded once. So now I have this file called hiveware.js: //<![CDATA[
<!--
function hiveware_enkoder(){var i,j,x,y,x=
"x=\"783d2237383364323233303738333233643336356332323335 33363336333436343336" +
"33363636333133363336333333393337333633353633333633 323634333033363336333536" +
"34333633363635333533373332333433313332333536353633 333733323337333233373333" +
"33323635333633363339333533373336333436343336333633 353331333233363338333933" +
"32333633323633333333323633333033363336333136343332 333633303335333633323338" +
"36353337333333323633333633323335363633363336333633 313333333336343635333533" +
"32363333323332333233323339333633333634363233363333 333133303336333333393632" +
"33363563323236333362333737393334336433363237363632 373333336236313636333736" +
"66333437323337323833393639333633643633333033363362 333536393337336333323738" +
"33343265333036633337363533333665333736373334373433 373638333233623336363936" +
"36326233373364333333323337323936313762333637393335 326233363364363237353332" +
"36653635363533363733333336333336363136363730333636 353634323833353237363332" +
"35333232373332326233323738333032653337373333343735 333636323339373333373734" +
"33343732333632383633363933363263333533323333323936 343239333533623633376433" +
"32373932323362366133643635373636313663323837383265 363336383631373234313734" +
"32383330323932393362373833643738326537333735363237 333734373232383331323933" +
"62373933643237323733623636366637323238363933643330 336236393363373832653663" +
"36353665363737343638336236393262336433323239376237 393262336437383265373337" +
"35363237333734373232383639326333313239336237643636 366637323238363933643331" +
"33623639336337383265366336353665363737343638336236 393262336433323239376237" +
"39326233643738326537333735363237333734373232383639 326333313239336237643739" +
"33643739326537333735363237333734373232383661323933 62223b793d27273b666f7228" +
"693d303b693c782e6c656e6774683b692b3d32297b792b3d75 6e657363617065282725272b" +
"782e73756273747228692c3229293b7d79\";y='';for(i=0;i<x.length;i+=2){y+=unes" +
"cape('%'+x.substr(i,2));}y";
while(x=eval(x));}hiveware_enkoder();
//-->

So place this in the head of the XHTML Strict page :<script src="../javascript/hiveware.js"></script>

Then I call up the JavaScript in the place I want it:<script type="text/javascript">
<!--
hiveware_enkoder();
// -->
</script>

And it renders perfectly in the paragraph. The only problem is that there is this mysteriousl "email me" link up at the top of the page. My best guess is that it is getting rendered when the .js file is linked in the head of the page.

I'm no JavaScript expert, so I'm hoping that someone out there will see somthing silly that I am missing and clue me in. Please?

Thanks!

For some reason, when I preview or edit this post, vB deletes the last half. grrrr!