Results 1 to 2 of 2

Thread: JS Accordion Menu

  1. #1
    Join Date
    Dec 2008

    JS Accordion Menu

    Hi, I found the below JS for accordion menu on hover. I would like to use it but afraid that it might not be safe. I read somewhere that using the eval((function() might open up your code for injection attacks. Is it safe to use the below code or is there any better script without jquery that i can use? thx.

    eval((function(){a=" {3document5ByIdOgvv=8E!&&E!K32}o=E;E;v=parseInt(2E=o;3vdheight=vHpx}Oofvgvv=v/d.h;dDv;dfilterKalpha(D+v*100H)Obz>0z#-1:z-v90E;%eE;z<x(x-z)#+1:v+z9x%Accordians,fl=5sByTagName(diva=[]d=S;QQ,Q)=={a.push}}xL((hc=h0,hc6==hcMc+;c;coverflowKhidden;c.h=g(cc.s=(s=8) ?7:s;h.f=f;h.c=a;h .match4fHH))x=h}hC=(Rj=0;j<F.c;j++n=F.c[j];n=n0,ndMn6nMn+;s=d Jt4sH)Rp=0;p<s;p++s[p]=KGsJce(p,1d =s.join( break}}clearn.tQ==FPg(n,0@ed +K GP@b}}}}})(S)}x!LxC()}}",b=49;while(b>=0)a=a.replace(new RegExp(" #%2345689@CDEFGHJKLMOPQRS".charAt(b),"g"),("\\\042\044.style.dis playfunctionInterval(.className.length.indexOf(-)(d)if(-content).id){.style.=none{d=;z=g;x=d.h;(d,;for(i=0;i<l;i++);}else{('+n+')',9)} .substr(=blockv=Math.round(/d.sv=(v<1)?zcleard.t)}} d.offsetHeightreturn (new RegExp(.getElement+-header=undefined;ofv)gn.t=set'.onmouseoveropacity=dthis+d.f+.spli==null=(} n=dfor(l[i]".split(""))[b--]);return a})())

  2. #2
    Join Date
    Aug 2008
    Improper use of eval could open up the possibility of injection attacks, mainly if you use user input in the eval code and just assume the input is safe. (To build a secure application you should always assume every user is the worst hacker! Just a note.) But that doesn't happen here so I'd say the script is safe to use.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center