User Name
Password
AppleNova Forums » Genius Bar »

Hiveware Enkoder + external .js = ARRRGGGHHHHH


Register Members List Calendar Search FAQ Posting Guidelines
Hiveware Enkoder + external .js = ARRRGGGHHHHH
Thread Tools
Stroszek
Member
 
Join Date: May 2004
Send a message via AIM to 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:
Code:
//<![CDATA[ <!-- function hiveware_enkoder(){var i,j,x,y,x= "x=\"783d223738336432323330373833323364333635633232333533363336333436343336" + "33363636333133363336333333393337333633353633333633323634333033363336333536" + "34333633363635333533373332333433313332333536353633333733323337333233373333" + "33323635333633363339333533373336333436343336333633353331333233363338333933" + "32333633323633333333323633333033363336333136343332333633303335333633323338" + "36353337333333323633333633323335363633363336333633313333333336343635333533" + "32363333323332333233323339333633333634363233363333333133303336333333393632" + "33363563323236333362333737393334336433363237363632373333336236313636333736" + "66333437323337323833393639333633643633333033363362333536393337336333323738" + "33343265333036633337363533333665333736373334373433373638333233623336363936" + "36326233373364333333323337323936313762333637393335326233363364363237353332" + "36653635363533363733333336333336363136363730333636353634323833353237363332" + "35333232373332326233323738333032653337373333343735333636323339373333373734" + "33343732333632383633363933363263333533323333323936343239333533623633376433" + "32373932323362366133643635373636313663323837383265363336383631373234313734" + "32383330323932393362373833643738326537333735363237333734373232383331323933" + "62373933643237323733623636366637323238363933643330336236393363373832653663" + "36353665363737343638336236393262336433323239376237393262336437383265373337" + "35363237333734373232383639326333313239336237643636366637323238363933643331" + "33623639336337383265366336353665363737343638336236393262336433323239376237" + "39326233643738326537333735363237333734373232383639326333313239336237643739" + "3364373932653733373536323733373437323238366132393362223b793d27273b666f7228" + "693d303b693c782e6c656e6774683b692b3d32297b792b3d756e657363617065282725272b" + "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 :
Code:
<script src="../javascript/hiveware.js"></script>
Then I call up the JavaScript in the place I want it:
Code:
<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!
  quote
Posting Rules Navigation
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Post Reply

Forum Jump
Thread Tools

« Previous Thread | Next Thread »

All times are GMT -5. The time now is 03:13.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2024, AppleNova