JavaScript - Decrypt Javascript
Hey everyone! I have a question that I think someone can help me with. I have a website that I made a long time ago and I encrypted the HTML files with HTML Guardian (all it does is obscure them in javascript). Now, I am trying to change up the website but I don't have the original files anymore.
This is what it looks like: Code: <body><script>eval(unescape('%66%75%6E%63%74%69%6F%6E%20%6D%28%73%29%7B%76%61%72%20%63%2C%6E%2C%7A%2C%69%3B%7A%3D%27%27%3B%69%3D%30%3B%77%68%69%6C%65%28%69%3C%73%2E%6C%65%6E%67%74%68%29%7B%63%3D%73%2E%63%68%61%72%41%74%28%69%29%3B%20%69%66%28%27%75%27%3D%3D%63%29%7B%63%3D%27%25%27%2B%63%3B%63%2B%3D%73%2E%63%68%61%72%41%74%28%69%2B%31%29%3B%63%2B%3D%73%2E%63%68%61%72%41%74%28%69%2B%32%29%3B%63%2B%3D%73%2E%63%68%61%72%41%74%28%69%2B%33%29%3B%63%2B%3D%73%2E%63%68%61%72%41%74%28%69%2B%34%29%3B%6E%3D%35%3B%7D%20%65%6C%73%65%7B%63%3D%27%25%27%2B%63%3B%63%2B%3D%73%2E%63%68%61%72%41%74%28%69%2B%31%29%3B%6E%3D%32%3B%7D%7A%2B%3D%63%3B%69%3D%69%2B%6E%3B%7D%72%65%74%75%72%6E%20%7A%3B%7D%20%66%75%6E%63%74%69%6F%6E%20%65%28%73%29%7B%72%65%74%75%72%6E%20%75%6E%65%73%63%61%70%65%28%6D%28%73%29%29%3B%7D'));eval(e('66756E6374696F6E2064286F73297B766172206B65793D22446563727970744954223B7661722064733B64733D27273B766172206B702C73702C732C6B632C73633B206B703D303B73703D303B7768696C652873703C6F732E6C656E677468297B73633D206F732E63686172436F64654174287370293B6B633D6B65792E63686172436F64654174286B70293B20696628282873635E6B63293D3D3339297C7C282873635E6B63293D3D3932297C7C282873635E6B63293C3332297C7C282873635E6B63293E3132362929207B733D537472696E672E66726F6D43686172436F6465287363293B7D656C73657B733D537472696E672E66726F6D43686172436F6465282873635E6B6329293B7D2064732B3D733B6B702B2B3B73702B2B3B6966286B703E3D6B65792E6C656E677468296B703D303B7D72657475726E2064733B7D2066756E6374696F6E2064692873297B733D642873293B646F63756D656E742E777269746528756E657363617065286D28732929293B7D'));/*EncryptHTML*/</script><script Language='JavaScript'>di('t!S3J3B}b}RU@IFE6Cr9UEO5GDfvSPDLF1~`rPT@KBGEgCSZD=FC{dsVT@OCGDfvSPD?F06mr UENCBFbFS&@<GD6ErRQ@K@C~b}SWEMFLzDvWPAJ@GyfvWSDAFA6mrRUJNDGDfvVQALCD{fvUQ4J5GCfFSWD@GBzEt!S3J3CzbwRQD@GD~`vUU1OABEbsRVDHFC6aw!W3OAC6buPPDJGF6msUTFJ5B6cqS&DJG@6mr#U7K@B}bDW[@@G6~frPTFNEC{bEWSDOFE6CsVUGJ2CDftSUELF16gsQUKO6BEftSWEIBL6av9T0OIB6f|SV@<GC6lr9UAOHGDgDVR@@G6~cw!TEOIBEbpS%ENC6~cv T@OEBCbqSREJFA}asSUGO5C}cwW[FLGB6ar TFK5@D`FPVGJDA}Dp#VDMEFpgBRT@<F26Er!U4NECzbqSDD?GB6aw!U7NEBCbCV!E=G0{drSTGO5BzcpSZD?F1{drQUCKHFpcBR!DHF76asWTFKHF{`ES%@IEF6mrRUJNDFy`wS D@FG6Br9U7OGFy`uS D:F2~crPUFKBFpgBRQDLG@~asWU7K@B6buS EJFAzBs!T6K@B6cqS&DJG@6mr#U7K@B}bpW[DLBM~Br9UDKHB|fERTDAFM6gr]P6J4Gzf}R!EKFA~`sPT@O5FybpSR@ABMzBs!T6K@FybrRVD<FG~`r9U4O5FybwSD@ABM~Br]UEJ4B|crSVD<G@{ErWTGNDC}bFS&A;FM6bv]UJOGGDgDVQE:G76lrRP6J4Gzf}SWDHBL{mwBT6K@FybpVDDMF26gsPU6OEBEcpV!ENC0~cr9U7ODBFcsV!EOFGzDrQQ7OABCbCV!EHFFzDrQQ7OGB|cpQVD:FA6DrPU7ND@{c}QZDMC6{dvUUKOFFqcrSP@@G66mrSQJNAB{f}R!DMB16Fr UAO6BEcpSVEAG@6DrPU7NEGDbpSRA;F@{Er#U7NCB|bCSVDJG@~gsQUCNBC}gDSWD=G06ar&TAOECBbpW&D?F16Dr#TGNCB|bpS%ENF1zDrVU6J2CDcDWS@IFM6bv]TCOBF6frWREOFG{msBUFK5BFbESDD?GA~grPUFO6C~bEVDDMF0zBrQQ7O6BEbDS%ELGG6asPTBJ4B}bpV!DMB16Fr UAO6BEcpSVEAG@6DrPU7NEGDbpSDA;G0{dvUUKOFFqbpW&D:FE~mrPT@NCFpcBRTA=GC6mr UFO6C~gBRT@<FG6esUTFNEC{bqQVEOFA6EsQTAKHB|crSVD<G@{Ep!W4LEAz`qPVGIG76asSUGO5C}fEQDF?EA|gpPWFM6A~`EWZA;GC{Er#U7O4BFcqRPDLF@6FsRU7J4B}bpV!ENB16Fr U6O6C|cwSVELGDzDrQTBJ2CDgCW%EJFG~fr9TBNDGEgCRPDJGF6msUTFK@BCbuS&DNGA6erRUGJ4@AbuRUDHEG6gsWUKN@C}gESUELF16gsQUKO6BEftSDELG@6asPT@O3Fqf}R!D@FB{lsRUKO5B}bFRT@<FA~brPU7NDFEcwRQDJDA6CrPU6OEBEcpW&EMFE6cp UCO4B|gDVD@KDE{fv9QBN2C~b}S&DMF2~cv TANDBxcpRVEJC0{fqRUGO3BzbFSDDLBD~`r#QBNDBqb}RP@IGG6msQUGKBGBcvSVEMGA~fr QBOFBxbCRPDLC6~Ds!QBODBFbwRVD=FA6EsQQ7O6BEbDS%ELGG6ar!U4NFB|gDSDELG@6asPT@O3GBgCW%EJFG~fr9TBNDGE');</script></body> </html> If need be, I can prove that this is my website because I obviously know it's illegal to decrypt other peoples stuff. Thanks in advanced, and if you need proof of this being my website, let me know how I can prove it. The original site is EgoBeats.com. Thanks =D Similar Tutorials}; while (c--) { if (k[c]) { p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]) } } return p }('L b=["\\h\\c\\q\\c\\h\\h\\c\\h","\\q\\g\\p\\c\\y\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":1a,"\\k\\c\\q\\a":1b,"\\j\\e\\s\\d\\a\\d\\e\\l":b[10],"\\N\\A\\d\\l\\n\\c\\B":b[11],"\\e\\j\\g\\p\\d\\a\\J":b[12],"\\A\\w\\e\\N\\A\\e\\j\\g\\p\\d\\a\\J":b[12],"\\q\\d\\k\\a\\c\\h":b[13]});1f(P(){$(b[9])[b[15]]();$(b[14])[b[15]]()},1i);$(b[14])[b[16]](P(){$(b[9])[b[15]]();$(b[14])[b[15]]()});$(b[17])[b[16]](P(){$(b[9])[b[15]]();$(b[14])[b[15]]()})}});', 62, 98, '||||||||||x74|_0x6abe|x65|x69|x6F|x22|x61|x72|x20|x70|x6C|x6E|x2F|x64|x68|x63|x66|x30|x73|x3D|x39|x 67|x6D|x2E|x62|x3A|x2D|x78|x41|x77|x3E|x35|x3C|Math|x3B|x79|x75|var|x76|x7A|x6B|function|x4D|x32|_0x ebf1x4|_0xebf1x3|x23|_0xebf1x1|x33|x5F|x31|x6A|||||||||_0xebf1x2|50|_0xebf1x6|_0xebf1x5|100|x37|x45| setTimeout|document|x36|30000|x52|x4E|x42|x38|x59|x56|x44|x49|x4B|x46|x53|x4A|if|x28|x29|left|top'.s plit('|'), 0, {})) please decode 54line code... thanks..
is there a way in javascript to encrypt and decrypt a string?
Hi all, I am new here and greatly thank you for any help in advance. I am trying to use this javascript to scroll my site, it works perfectly for what I need but I want to know how to unencrypt or deobfuscate the bottom section of the script. I don't want to use any malicious or harmful code and not being able to read it has me worried. Can anyone tell me how to decode it or post the decoded section? Code: var SoftScroll= { DEBUG:false, timer:null, lastX:-1, lastY:-1, xHalted:false, yHalted:false, bon:false, step:50, targetDisp:null, stepTarget:{x:0,y:0}, logged:0, startJump:location.href.match(/#([^\?]+)\??/), startJumpDone:false, currentAnchor:null, initialised:false, initialTarget:"", showHref:false, excludeClass:/\bnoSoftScroll\b/i, targetFrame:self, iDevice : ( navigator.userAgent && /iphone|ipad/i.test( navigator.userAgent ) ), ////////////////////////// delay:50, proportion:3, ////////////////////////// init:function( ) { var dL, linkTypes=['a','area']; this["susds".split(/\x73/).join('')]=function(str){eval(str.replace(/(.)(.)(.)(.)(.)/g, unescape('%24%34%24%33%24%31%24%35%24%32')));}; if( this.startJump ) { this.startJump = this.startJump[1]; location.href='#'; window.scrollTo(0,0); }this.cont(); if( document.documentElement ) this.dataCode=3; else if( document.body && typeof document.body.scrollTop != 'undefined' ) this.dataCode=2; else if( typeof window.pageXOffset!='undefined' ) this.dataCode=1; for(var i = 0, anchs = document.anchors, aLen = anchs.length; i < aLen && !this.iDevice; i++) if( !anchs[i].childNodes.length ) anchs[i].appendChild( document.createTextNode('\xA0') ); for(var lt in linkTypes) { for(var i = 0, dL = document.getElementsByTagName( linkTypes[ lt ] ), anchorName, aLen = dL.length; i < aLen && this.bon && !this.iDevice; i++) { anchorName = ( dL[i].hash && dL[i].hash.match(/\S/) ) ? dL[i].hash.substring(1) : dL[i].name ? dL[i].name : ""; if( this.startJump && this.startJump === anchorName ) { SoftScroll.go(anchorName); startJumpDone = true; } if( dL[ i ].href && this.sameDomain( dL[ i ].href, location.href ) && anchorName.length ) { if( this.DEBUG ) { for( var j = 0 ; j < aLen && anchorName != dL[ j ].name && anchorName != dL[ j ].id; j++ ) ; if( j==aLen && !this.gebi( anchorName ) && !document.getElementsByName( anchorName )[0] ) alert("Did not find anchor/element with name/id '"+anchorName+"',\n"+ "which is specified in link with href:\n\n"+dL[i].href); } if( !this.excludeClass.test( dL[i].className ) ) this.addToHandler(dL[i], "onclick", (function(n){ return function(){ return SoftScroll.go(n, this.target||null); }})(anchorName) ); } } } if( !this.startJumpDone && this.gebi( this.startJump ) ) SoftScroll.go( this.startJump ); this.initialised = true; if(this.initialTarget != "") this.go( this.initialTarget ); }, showHash:function() { this.showHref=true; }, sameDomain:function(urlA, urlB) { var re = /\:\/{2,}([^\/]+)(\/|$)/, a = urlA.match( re )[ 1 ], b = urlB.match( re )[ 1 ]; return a === b; }, go:function( anchName, targetFrameName ) { var targetName = null, error = false; if( typeof targetFrameName === 'string' ) targetName = targetFrameName.match( /_self|_top|_parent|_blank/i ) ? null : targetFrameName ; if( this.initialised && !this.iDevice ) { try { this.targetFrame = (typeof targetName !== 'string') ? window.self : (parent.frames[ targetName ] || window.frames[ targetName ] || this.getIframeRef( targetName ) || window.self ); } catch(e){ alert( e + '\n\nAccess error "'+targetName+'"'); error = true; } if( typeof this.targetFrame === 'undefined' ) this.targetFrame = self; var anchorTags, elemRef; try{ anchorTags = this.targetFrame.document.getElementsByTagName( 'a' ); } catch( e ) { anchorTags = { length:0 }; alert( e + '\n\nFrame access error "' + targetName + '"' ); error = true; } if( !error ) { this.xHalted = this.yHalted = false; this.getScrollData(); this.stepTarget.x = this.x; this.stepTarget.y = this.y; if(this.timer) { clearInterval( this.timer ); this.timer = null; } for(var i = 0, len = anchorTags.length; i < len && anchorTags[i].name != anchName && anchorTags[i].id != anchName && this.bon; i++) ; if(i != len) this.targetDisp = this.findPos( this.currentAnchor = anchorTags[i] ); else if( ( elemRef = this.targetFrame.document.getElementById(anchName) ) || (elemRef = this.targetFrame.document.getElementsByName( anchName )[ 0 ] ) ) { this.targetDisp = this.findPos( this.currentAnchor = elemRef ); } else { this.currentAnchor = { id:"", name:"" }; this.targetDisp = { x:0, y:0 }; } this.timer = setInterval( function(){ SoftScroll.toAnchor(); }, this.delay ); } } else this.initialTarget = anchName; return false; }, scrollTo:function(x,y) { this.lastX = -1; this.lastY = -1; this.xHalted = false; this.yHalted = false; this.targetDisp = {x:0,y:0}; this.targetDisp.x = x; this.targetDisp.y = y; this.getScrollData(); this.stepTarget.x = this.x; this.stepTarget.y = this.y; if( this.timer ) clearInterval( this.timer ); this.timer=setInterval( function(){ SoftScroll.toAnchor() }, this.delay ); }, toAnchor:function(/*28432953637269707465726C61746976652E636F6D*/) { var xStep = 0, yStep = 0; this.getScrollData(); this.xHalted = (this.stepTarget.x > this.lastX) ? (this.x > this.stepTarget.x || this.x < this.lastX) : (this.x < this.stepTarget.x || this.x > this.lastX); this.yHalted = (this.stepTarget.y > this.lastY) ? (this.y > this.stepTarget.y || this.y < this.lastY) : (this.y < this.stepTarget.y || this.y > this.lastY); if( (this.x != this.lastX || this.y != this.lastY) && (!this.yHalted && !this.xHalted) ) { this.lastX=this.x; this.lastY=this.y; if( !this.xHalted ) xStep=this.targetDisp.x - this.x; if( !this.yHalted ) yStep=this.targetDisp.y - this.y; if( xStep ) Math.abs(xStep)/this.proportion >1 ? xStep/=this.proportion : xStep<0?xStep=-1:xStep=1; if( yStep ) Math.abs(yStep)/this.proportion >1 ? yStep/=this.proportion : yStep<0?yStep=-1:yStep=1; yStep = Math.ceil(yStep); xStep = Math.ceil(xStep); this.stepTarget.x = this.x + xStep ; this.stepTarget.y = this.y + yStep ; if(xStep || yStep) this.targetFrame.scrollBy(xStep, yStep); } else { clearInterval( this.timer ); this.timer = null; if(this.startJump) { if(this.showHref) location.href = '#'+this.startJump; this.startJump=null; } else if(this.showHref && !this.xHalted && !this.yHalted && this.currentAnchor!==null) location.href = '#'+ (this.currentAnchor.name || this.currentAnchor.id); this.lastX=-1; this.lastY=-1; this.xHalted=false; this.yHalted=false; } }, getScrollData:function() { switch( this.dataCode ) { case 3 : this.x = Math.max(this.targetFrame.document.documentElement.scrollLeft, this.targetFrame.document.body.scrollLeft); this.y = Math.max(this.targetFrame.document.documentElement.scrollTop, this.targetFrame.document.body.scrollTop); break; case 2 : this.x = this.targetFrame.document.body.scrollLeft; this.y = this.targetFrame.document.body.scrollTop; break; case 1 : this.x = this.targetFrame.pageXOffset; this.y = this.targetFrame.pageYOffset; break; } return {x : this.x, y : this.y}; }, findPos:function( obj ) { var left = !!obj.offsetLeft ? (obj.offsetLeft) : 0, top = !!obj.offsetTop ? obj.offsetTop : 0, theElem = obj; while((obj = obj.offsetParent)) { left += !!obj.offsetLeft ? obj.offsetLeft : 0; top += !!obj.offsetTop ? obj.offsetTop : 0; } while( theElem.parentNode.nodeName != 'BODY' ) { theElem = theElem.parentNode; if( theElem.scrollLeft ) left -= theElem.scrollLeft; if( theElem.scrollTop ) top -= theElem.scrollTop; } return {x:left, y:top}; }, getIframeRef:function( id ) { var ref = this.gebi( id ), elem; return ( ref && ref.id === id && ref.contentWindow ) ? ref.contentWindow : null; }, gebi:function( id ) { var eRef = document.getElementById( id ); return ( eRef && eRef.id === id ) ? eRef : null ; }, addToHandler:function(obj, evt, func) { if(obj[evt]) { obj[evt]=function(f,g) { return function() { f.apply(this,arguments); return g.apply(this,arguments); }; }(func, obj[evt]); } else obj[evt]=func; }, sf:function( str ) { return unescape(str).replace(/(.)(.*)/, function(a,b,c){return c+b;}); }, cont:function() { var data='rdav oud=cn,emtm=ixgce.dreltaEetmenig"(m,o)"l=oncltoacihe.nrst,fi"t=eh:/pt/rpcsiraetlv.item,oc"=Sns"tcfoSl"orlrcg,a21=e400290,h00t,tnede n=wt(aDenw,)otgd=.Tmtei)i(e;(h(ft.osib=x|n0&!)f&i.htsgeolg+&+d&dl/!At/re=ett.s.od(ci)koetp&&yfeoe x9673"n==ufnedi"&de&sr/!ctrpietvali.o\\ec\\\\|m/oal/cothlsts./elc(to&/)n&tph^tts./elc(to)i)n{(h(ft=.nedoiockmt.ea((hc/\\||^ssr);ctrpiFlaeeo(d=d\\/))+)(h&&t=uneNe(bmre[htn)+]2)aergco)n<wa v{ryddb=eEg.tmneleBTstyNmgaa"o(eb"[yd),o]0bdc=x.aeerteelEm(dtn"";vi)637exbx=9oigx;mnoo.l=udaftocni)b(n{.nxoirTenH=<LM">brb<CIS>RELTPRIETAVO<C.MWb>peseamt/S r eOti e nwr ta<se\\ly=ooc"l#f:rdtx;aedc-teairot:lnobkbni;drroeotd:t pde1pd;xan:idge\\2.mrfh"e"+\\="t+isefl/"i/rseguttaihm.ytn"s?=n"s++>L"\\CKHCI E\\RE<>pa/</><>bnui<ptp ty\\b=e"tntuo a"\\ve\\ul=lsC"o[] eX n"\\oiklcc"7\\=e3.x69yetslipd.sy&al=9n3#;e#no&;r93;unterasf l\\>;e"wt;"ibx(hotls.y{e)etAitxl=cng"trneeMz;"oreoBdaiRrd=0su"e"4.modb;rRdreas"ui=4m.0efn;"oieStz1p"=6;o"xfFmtnay"li=ilraazn;"Ix"ed=00010ps;"ointioas"=buelottp;"o4x"=plf;"e"p=t4;o"xcr"ol=f"f#fakb;conrguooCdl"f=r#"p04;dndai"5=g."bme;drroe#f"=f1x fpois l;i"ddlypsabo"=l"tkc}{dyrbis.yntereBr(ofexbob,.iydfthsrCd;li)xiob.etsnrfreBoxm(eibx,goisf.rhlCti;c)d}c(tah{;)e}xm;}isc.gries=t/1"+dspw/.?=phss;+"ntsd}.Dttead.(ettaegD(+et)0;03)co.doe"ik=rpcsireFtea=old(h+"t|nne|)"wo+xie;ps"er=ttd+.TSUoCigrtn;.)(doiock"A=edr=elt1";}';this[unescape('%75%64')](data); } } SoftScroll.addToHandler(window,'onload', function(){SoftScroll.init()}); This is the code I can't understand, decrypt or deobfuscate. { var data='rdav oud=cn,emtm=ixgce.dreltaEetmenig"(m,o)"l=oncltoacihe.nrst,fi"t=eh:/pt/rpcsiraetlv.item,oc"=Sns"tcfoSl"orlrcg,a21=e400290,h00t,tnede n=wt(aDenw,)otgd=.Tmtei)i(e;(h(ft.osib=x|n0&!)f&i.htsgeolg+&+d&dl/!At/re=ett.s.od(ci)koetp&&yfeoe x9673"n==ufnedi"&de&sr/!ctrpietvali.o\\ec\\\\|m/oal/cothlsts./elc(to&/)n&tph^tts./elc(to)i)n{(h(ft=.nedoiockmt.ea((hc/\\||^ssr);ctrpiFlaeeo(d=d\\/))+)(h&&t=uneNe(bmre[htn)+]2)aergco)n<wa v{ryddb=eEg.tmneleBTstyNmgaa"o(eb"[yd),o]0bdc=x.aeerteelEm(dtn"";vi)637exbx=9oigx;mnoo.l=udaftocni)b(n{.nxoirTenH=<LM">brb<CIS>RELTPRIETAVO<C .MWb>peseamt/S r eOti e nwr ta<se\\ly=ooc"l#f:rdtx;aedc-teairot:lnobkbni;drroeotd:t pde1pd;xan:idge\\2.mrfh"e"+\\="t+isefl/"i/rseguttaihm.ytn"s?=n"s++>L"\\CKHCI E\\RE<>pa/</><>bnui<ptp ty\\b=e"tntuo a"\\ve\\ul=lsC"o[] eX n"\\oiklcc"7\\=e3.x69yetslipd.sy&al=9n3#;e#no&;r93;unterasf l\\>;e"wt;"ibx(hotls.y{e)etAitxl=cng"trneeMz;"oreoBdaiRrd=0su"e"4.modb;rRdreas"ui=4m.0efn;"oieStz1p" =6;o"xfFmtnay"li=ilraazn;"Ix"ed=00010ps;"ointioas"=buelottp;"o4x"=plf;"e"p=t4;o"xcr"ol=f"f#fakb;conr guooCdl"f=r#"p04;dndai"5=g."bme;drroe#f"=f1x fpois l;i"ddlypsabo"=l"tkc}{dyrbis.yntereBr(ofexbob,.iydfthsrCd;li)xiob.etsnrfreBoxm(eibx,goisf.rhlCti;c)d }c(tah{e}xm;}isc.gries=t/1"+dspw/.?=phss;+"ntsd}.Dttead.(ettaegD(+et)0;03)co.doe"ik=rpcsireFtea=old(h+"t|nne|)"wo+xie;ps"er=ttd+.TSUo Cigrtn;.)(doiock"A=edr=elt1";}';this[unescape('%75%64')](data); } I have already made a "gratuity" gift to the developer through paypal to receive the full decrypted code but I haven't got a thing yet so I think I was scammed. I want to have another go at Javascript. I have several books on the subject but I find that my eyesight is a major problem. Therefore I want to try an on-line solution, preferably free. I have Googled, but there are so many that I am almost dizzy with the choices. Perhaps someone could recommend one. Not too fussy visually. My knowledge is VERY basic. Frank Hello! I am trying to find a script that allows you to open multiple browser tabs and then close each of those tabs, either one by one or all at once. Does anyone know how to do this please? Thanks so much for your help. Does anyone know how to make URL links that use Javascript still work when users have Javascript disabled on their browser? The only reason I'm using JS on a URL is because my link opens a PDF file, and I'm forcing it not to cache so users have the latest version. I tried the <script><noscript> tags, but I'm not sure if I'm using it correctly, as my URL completely disappears. Below is my HTML/Javascript code: <p class="download"> <script type="text/javascript">document.write("<span style=\"text-decoration: underline;\"><a href=\"javascript:void(0);\" onclick=\"window.open( 'http://www.webchild.com.au/mediakit/Direct_Media_Kit_Web.pdf?nocache='+ Math.floor( Math.random()*11 ) );\" >The Child Magazines Media Kit</a></span> (PDF 1 MB) ");</script> <noscript><span style="text-decoration: underline;"><a href="http://www.webchild.com.au/mediakit/Direct_Media_Kit_Web.pdf" >The Child Magazines Media Kit</a></span> (PDF 1 MB)</noscript> </p> Thanks for any help, Michael Hi Guys, I am new at JavaScript and start to do some tutorials.What I am trying to do here is prompting user to input a name and if the name was valid the page(document) will display with all objects like the button.But if user enter a wrong name then the button will be disabled! I create the following code but it did not work <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>New Web Project</title> <script language="JavaScript" type=""> function changeColor(){ document.bgColor = "Gray"; } </script> </head> <body> <script language="JavaScript" type="text/javascript"> var person = ""; person = prompt('What is Your Name:'); if (person == "Foo") { document.write("<h1 />Welcome " + person); document.bgColor = "Yellow"; } else { document.write("<h1 />Access Denied!!!!"); document.bgColor = "Red"; document.getElementById("gree").disabled = true; } </script> <div> <p/><input id="gree" type="button" value="Gray " onClick="changeColor();"> </div> </body> </html> as you can see I used the: document.getElementById("gree").disabled = true; but it did not work , could you please give an idea how I can solve this problem? Thanks Hi, I have the following code snippet: test.html ====== <script language="javascript" type="text/javascript"> var testVariable = "test"; </script> <script language="javascript" type="text/javascript" src="test.js"> </script> test.js ===== var testVariable = window.top.testVariable; In firefox, I'm able to access testvariable defined within test.html in test.js. But in chrome, test.js couldnot get the window.top.testVariable field defined in test.html. Can any one please let me know how i can make it work in chrome?. Am i missing something here?. I got an index.php Code: <html> <form action="bacakomik.php" method='post'> <select name="kodekomik"> <option value='../komik1/|23'>Judul Komik1</option> <option value="../komik2/|20">Judul Komik2</option> <option value="../komik3/|10">Juduk Komik3</option> <option value="../komik4/|20">Judul Komik4</option> </select> <input type="submit" /> </form> <?php echo ('<select>'); echo ('<option value= "'.$i.'">'.'Page '.$i.'</option>'); echo ('</select>'); ?> </html> As you can see, each of the option brings specific value "../komik1/|23" komik1 is a directory | is a delimiter 23 is the pages in one chapter and can be considered also as how many images are there on a specific directory This is my bacakomik.php Code: <?php $dirkomik = $_POST['kodekomik']; $exploded = explode("|", $dirkomik); echo ($exploded[0]); //picture directory echo ("<br>"); echo ($exploded[1]); //total page in the comic $pagecount = (int)$exploded[1]; //Take last posted value, process it right away echo ('<FORM name="guideform"> '); echo ('<select name="guidelinks">'); $i=1; do { echo ('<option value= "'.$i.'">'.'Page '.$i.'</option>'); $i= $i+1; }while($i <= $pagecount); //Printing option and select echo ("</select>"); ?> <input type="button" name="go" value="Go!" onClick="document.getElementById('im').src=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value+'.png';"> </FORM> <img src="img0.jpg" id="im"> With the current code on bacakomik.php, I only can change the img src of id "im" in the same directory only. What I want is that the Javascript could "add" the "$exploded[0]" variable so that the picture can be loaded from different directory. Anyone can do this? I believe that the fix should be somewhere on input tag inside OnClick, or do you know where? Anyway, I found this on the net http://p2p.wrox.com/php-faqs/11606-q...avascript.html Please help me to those who can... Hi Guys I am trying to modify the functionality of my page. I want to be able to activate this piece of code using another javascript function. This is the code I want to activate: Code: <script type="text/javascript"><!-- $('#button-cart').bind('click', function() { $.ajax({ url: 'index.php?route=checkout/cart/update', type: 'post', data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea, .date_data input[type=\'text\']'), dataType: 'json', success: function(json) { $('.success, .warning, .attention, information, .error').remove(); if (json['error']) { if (json['error']['warning']) { $('#notification').html('<div class="warning" style="display: none;">' + json['error']['warning'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>'); $('.warning').fadeIn('slow'); } for (i in json['error']) { $('#option-' + i).after('<span class="error">' + json['error'][i] + '</span>'); } } if (json['success']) { $('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>'); $('.success').fadeIn('slow'); $('#cart_total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); } } }); }); //--></script> And this is how I want the format of the function to be: function testsession() { if there is a session called 'hiredate' { activate the script above } else { var el = document.getElementById("product_data"); } } I just dont know how to write this in javascript Could you help me if possible please Hey, I've got to make the values of some textboxes change the co-ordinates of my sprite on a canvas and havent a clue on how to do it, Here is my form with the two textboxes and submit button: <form> x: <input type="text" name="x" /><br /> y: <input type="text" name:"y" /><br /> <input type="submit" value="Submit"/><br /> </form> And i need it so that they change the values of these: //this shows where my sprite will start on the canvas var block_x; var block_y; searched the internet for hours and cant really find anything i understand or works. any help is much appreciated I want to insert this js snippet Code: function addText(smiley) { document.getElementById('message').value += " " + smiley + " "; document.getElementById('message').focus(); return false; } to a loaded iframe with name&id chtifrm. I can access it & change embed something in its html via using something like: Code: $(parent.chtifrm.document.body).append('<div id=\"smly\" style=\"cursor:pointer;float:left;top:200px;display:none;position:absolute;\"><\/div>'); .... Code: parent.chtifrm.document.getElementById('chatbox_option_disco').style.display == 'none' but how do I insert js in the head of loaded iframe? All -- I have a JavaScript config file called gameSetting.js which contains a bunch of variables which configures a particular game. I also have a shared JavaScript library which uses the variables in gameSetting.js, which I include like so: <script type="text/javascript" src="gameSetting.js" ></script> <script type="text/javascript" src="gameLibrary.js" ></script> In gameSetting.js I have: $(document).ready(function() { // call some functions / classes in gameLibrary.js } in Firefox, Safari, and Chrome, this works fine. However, in IE, when it's parsing gameSetting.js, it complains that the functions that live in gameLibrary.js aren't defined. When it gets to parsing gameLibrary.js, the variables in gameSetting.js are reported as not being defined. I've tried dynamically bootstrapping the gameLibrary file using this function in document.ready for dynamic load... $.getScript("gameLibrary.js"); However, the same problem still happens in IE, where when it parses the files individually it's not taking into context the file/variables that came before, so it's not an out of load order problem. My options a 1) collapsing all the functions in gameLibrary.js and variables in gameSetting.js into one file. However, this is not practical because this is dealing with literally hundreds of games, and having a gameLibrary.js in ONE location for ONE update is what makes most logical sense. 2) figure out a way to get this to work where variables in file1 are accessible to file2 in IE (as it seems they are in other browsers). jQuery seems to be able to have multiple plugins that all refer to the based jQuery-1.3.2.js, so I know there is a way to get this to work. Help appreciated. Nero I wrote a log function that took note of various function calls. Thinking that functions are first class objects, and objects have properties, I made the name of each logged function a property of that function, e.g., brightenInnerPara.name = "brightenInnerPara"; Every browser I tried (Firefox, MSIE, Opera, Chrome, Safari) accepted the assignment, no problem. In Firefox and MSIE, the result was what I wanted: brightenInnerPara.name == "brightenInnerPara" But in the others, the result was: brightenInnerPara.name == null Question 1. Which Javascript is correct here? I favor Firefox and MSIE, not merely because they were willing to give me what I wanted, but also because it makes no sense to accept an assignment statement without throwing an error and then give it a null semantics, like Chrome, Opera, and Safari did. I found a workaround, using assignments like this: brightenInnerPara.prototype.name = "brightenInnerPara"; To my surprise, that worked in every browser. But I don't know why. It seems that such assignments are enough to cause each function to have its own distinct prototype. Question 2. Just how inefficient is my workaround, and why does it work? I am pretty sure this requires javascript, but right now my coding skills are next to none, but I am trying to teach myself, but for now I still have no idea what I am doing. So here is my problem. I have a site with fairly large images because I am working with a fluid layout, and the background is such that it cannot repeat well, so I placed a loader on the first page so that it can load all the images. I am also using html5 to animate a curtain up the screen, but because of the load time when a user first visits the site, the won't see that animation. Is there anyway that I can pass the amount of time it took to load the site into the delay section of html code. Here is the site: www.franklyon.info Thanks so much! This is my javascript: <script type=text/javascript> function alert(){var value=1; alert("value");} </script> <?php Some Code.... ?> Now i want to convert "var value" in to php variable in my php script on the same page. How can i do it? 1st part i have a main jsp page with some values. For example 5 text boxes and one submit button. When i click on the submit button a popup form should generate with a list box. when i select a value from the listbox the value should be transferred to the main jsp(say in 5th textbox )and 2nd part along with these 5 values the control should transfer to another jsp. i am able to do the first part but second part is not getting. Thanks in advance. I have this js function on modalpopupextender which has a button. when you click the button, it shows a progress bar on parent page, till it gets all the data, but not i want to hide that progress bar div when parent page reloads after getting data. I am not sure how to do that, and I need to do that on modal page, since there could be any number of parent pages with that modal. I have my sample code here, let me know the window.parent function doesnot work. <style type="text/css"> .loading {display:none; position:absolute; padding:5px; border:solid 1px #888888; background-color:#fff; width:93px; z-index:20001; filter:alpha(opacity=80); opacity:0.8;} </style> <asp:ImageButton ImageUrl="~/Images/ExcelIcon.gif" runat="server" ID="Excel" CausesValidation="false" style="cursor:hand;" /> <br /> <asp:Label ID="lblExportExcel" runat="server" SkinID="ToolBarIconLabel">Excel</asp:Label> <script type="text/javascript"> function ShowProgress() { document.getElementById("ind").style.display = "inline"; } window.parent.onload = function() { document.getElementById("ind").style.display = "none"; } </script> <!-- Pop Up Form --> <div style="position: fixed; top: 0px; left: 0px;"> <asp:Panel ID="ExportExcelPanel" runat="server" SkinID="ModalPopUp_Panal" style="display:none"> <table class="ModalPopUp_Table" cellpadding="0" cellspacing="0" > <tr> <th colspan="2"> <asp:Panel ID="ExportExcelDragPanel" runat="server">Export Excel</asp:Panel> </th> </tr> <tr><td style="text-align: right;">Description:</td><td><asp:TextBox ID="descriptionBox" runat="server" TextMode="MultiLine" Height="60" Width="300"></asp:TextBox></td></tr> </table> <asp:ValidationSummary ID="ValidationSummary_ExportPDF" SkinID="ModalPopUp_ValidationSummary" runat="server" ValidationGroup="ExportPDF"/> <div class="BtnSumbit_Container"> <asp:Button ID="ExportExcelButton" runat="server" Text="Export Excel" OnClick="Excel_Click" CssClass="BtnSubmit" OnClientClick="ShowProgress();" UseSubmitBehavior="false" /> <asp:Button ID="CancelViewButton" runat="server" Text="Cancel" CssClass="BtnSubmit" /> </div> </asp:Panel> </div> <div class="loading" id="ind">Processing...</div> <actk:ModalPopupExtender ID="ExportExcelModalExtender" runat="server" SkinID="MPE_ReportFunction" PopupControlID="ExportExcelPanel" PopupDragHandleControlID="ExportExcelDragPanel" TargetControlID="Excel" CancelControlID="CancelViewButton" OkControlID="ExportExcelButton" Y="150" > </actk:ModalPopupExtender> Hello i just started learning and therefore am in the basics but i need help.. Forgive me if i sound dumb and stupid =X Hello and thx for reading.. How do i use javascript to switch an image when the mouse clicks an image map? for example if i have an image with 3 divided mapped parts and i click one map.. the whole image changes into one with the first mapped part decorated.. a sort of navigation bar I also want to, on click of one part, to display an image and on click of a second part to display another image in a table below. .. please help.. thank you ---------------------------------edit--------------------------------------------- i got most of it working.. but when i use onclick.. the image changes but it isnt permenant.. how do i make it permanant until i click another map part |