JavaScript - Encryption Script Frustration
Hello,
I want to use this script I got from he http://javascript.about.com/library/blencrypt.htm The examples there work fine for me. But what I cannot seem to do is use any other 'key' than one made by Code: hexToByteArray(genkey()); I've tried all the things I can think of, like Code: var key = stringToByteArray("mickeymouse"); for instance, doesn't work... The ciphertext just says 'undefined' when I try to display it. I really cannot see the problem here. I just want to be able to use a user supplied key, not a bloomin random one every time. This is really frustrating me, it's even invading my dream time! Does anyone know what's going wrong here? Please help. Similar TutorialsI am having trouble with a script that works with the link invisibly which you can see the cursor change to a pointer hand when hovering next to "Email:". If I copyed and pasted the script below Code: <script language=JavaScript> <!-- var user = "name"; var host = "domain.com"; var link = user + "@" + host; document.write("<a hre" + "f=ma" + "ilto:" + user + "@" + host + ">" + link + "</a>"); //--> </script> It would show if you placed the script in the body portion of a blank HTML page. In my website below I can't figure out why the link doesn't show and is invisible. Any suggestions on how to fix this? This emailHide.html.txt file is below, to view in HTML remove the .txt extention and save and view in browser. I was going around few websites and found this: abitofextra dot com their source encryption is different and i have never really seen one like this. any ideas how they encrypted the source?! i work as freelancer and would be a great help if i could encrypt my codes too. can i write the encryption type in javascript?? i am writing like this in my javascript function, but not able to getting it work...... document.form_name.enctype ="multipart/form-data" I've been working on RSA encryption using javascript and php for quite some time but i'm not able to do it properly. i'm using the standard RSA.js,BigInt.js and Barrett.js javascript files for the javascript part but the thing that i have noticed is the public exponent is always 10001 or 3 . only then the function works. but the problem is the php file generates a comparatively larger public key exponent. if i use that in the javascript function it crashes. is there anyway out of this ?
I have a need of a Java Script function to encrypt passwords into Salted SHA in a format similar to the way LDAP stores it. Does anyone know if this has ever been done? Hi All, I have two scripts which I want to try and integrate. I am using a nice gallery script to show thumbnails which are appended to a an image wrapper which on click of the thumbnail shows the larger image in the image wrapper, I am trying to implement cloud zoom which is a plugin which uses image srcs to then point to an anchor href to show another larger zoom image either in the same place.. which is what I am trying to do or in another div beside. I have had to set me img srcs up in a certain way to easily enter some product details. and I need to try an manipulate the code to make it work to suit my file layout. I am using a var= images [ with a series of file locations and info such as below { src: 'romanticabride/thumbs/tn_Shauna.jpg', srcBig: 'romanticabride/images/Shauna.jpg', title: 'Shauna', longDescription: '<b><H1>Shauna</H1></b><br><b>Romantica Of Devon <br><br><h2>Sizes Available:</h2><br> 6 - 32.<b><br><b><br><b><b><b><H2>Colours Available:</h2><b><br>Various<br>Please Enquire Below<br><br><br><br><a href="mailto:tracy@cherishbridal.co.uk?subject=Web Enquiry Regarding Romantica Shauna Bridal Gown"class="enquiry rose glow" >Click To Enquire About This Item </a>' }, what I need is for cloud zoom to work when the main image wrapper is hovered over which means it will need to add a class or when the whichever srcBig: is hovered over it gets wrapped by href to make the script work . one of my pages is http://www.cherishbridal.co.uk/romaticabride.html the cloud zoom script is at http://www.professorcloud.com/mainsite/cloud-zoom.htm.. I am happy to share a jsfiddle with someone or explain further or post some code. Thank you in advance does any expert know how to pass parameters in the <script ..> tag? for instance; Code: <script type="text/javascript" src="script.js ?param1=val1¶m2=val2&etc "> in the javascript script.js, how would we read the params after the question mark? for example, google this; google shopping cart /v2_2/cart.js I have a script that works in seamonkey(my html editor) but when I use it in IE8 it says errors happen. Here's the code (the first line is on line 7 of the html file): Code: <script type="text/javascript"> function enlarge(imageNum) { var numToString = ""; if(parseInt(imageNum) < 10){ numToString = "0" + imageNum; } else { numToString = imageNum + ""; } window.open("images/LgScreenshot"+numToString+".jpg","Screenshot "+imageNum,"status=0,height=675,width=900,resizable=0"); } </script> And the errors: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB0.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; InfoPath.3; .NET CLR 3.0.30729) Timestamp: Wed, 10 Feb 2010 14:58:16 UTC Message: Object expected Line: 150 Char: 1 Code: 0 URI: http://samssc2site.co.cc/Features.html Message: Invalid argument. Line: 18 Char: 1 Code: 0 URI: http://samssc2site.co.cc/Features.html I need to assign a key in the javascript to actually make the javascript work,. I have a bookmark in chrome , a javascript , which actually works when clicked on it .,. but how can i edit it so that i can actually make it work on click a key or combination of keys. i want to declare the key or keycombo in the script itself .,. the script is for catching the selected text on the webpage and opening a new tab(or window) and doing an exact search search of the selected text using google.com .,., So I want it to work it this way ., select the text press a key and it opens a new tab (or window) with an xact search .,. i want to declare the key or keycombo in the script itself .,. the script is for catching the selected text on the webpage and opening a new tab(or window) and doing an exact search search of the selected text using google.com .,., So I want it to work it this way ., select the text press a key and it opens a new tab (or window) with an xact search .,. Thanks in advance ., Nani On this website: http://evancoleman.net/index.php I really like on the top how the menu has like 5 or 6 icons, and when you hover over them it shows a bubble with the name in them. Does anybody know where I can find this script? Thanks. Hello again . If these questions concerning Regular Expressions are inappropriate in this forum please let me know . Thank You. This expression <script[^>]*>.*?</script> matches ... Code: <script type="text/javascript">var cnnIsHomePage = true;</script> but not ... Code: <script type="text/javascript"> var cnnIsHomePage = true; </script> Please , how can i match the latter ? Hello Everyone, Im having trouble at work. They asked me to write a script that will take the 25 first words of a web page and store it to use it later on in the back office of a platform. My problem is i do not know how to get javascript to view 25 words from a site. I wouldnt be able to touch the HTML on the Site. Is this possible? please help i have this Code: VERSION BUILD=6650406 RECORDER=FX TAB T=1 URL GOTO=something.com TAG POS=2 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=NAME:id CONTENT=something1 SET !ENCRYPTION NO TAG POS=2 TYPE=INPUT:PASSWORD FORM=NAME:NoFormName ATTR=NAME:pw CONTENT=something1 SET !ENCRYPTION NO TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:NoFormName ATTR=NAME:pw2 CONTENT=something1 TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=NAME:email CONTENT=something@so.com.com TAG POS=1 TYPE=SELECT FORM=NAME:NoFormName ATTR=NAME:year CONTENT=%1964 TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:NoFormName ATTR=VALUE:Register! now what i need is to change the code so the "something" in all CONTENT will change everytime. the math formula would be [x]+1 where x = something so it would end up as something1 ->something2->something3 and so on and on and on any ideas how can i change it? sorry - total javascript newbie over this side of screen Hi I have found a script I would like to make a few changes to.. I have tried a few tricks but got me no-where. If you could help me I will be very much appreciated! Code: <HEAD> <script language="javascript"> <!-- //These are the names of the people you don't want //To add a person, just put their name in quotation marks //and add a comma after Names = new Array( "test1@email.com", "test2@email.com", "test3@email.com", "test4@email.com", "test5@email.com") function Check() { //Change FORM and FIELD to the form name and field name throughout this function namechk=document.FORM.FIELD.value.toLowerCase() awdrgy = 0 aLeRt = 0 while (awdrgy<=Names.length-1 && aLeRt!=1) { if (namechk==Names[awdrgy]) { aLeRt = 1 alert("Either your account is suspended or you entered an invalid email address! Please try again.") document.FORM.FIELD.value="" } awdrgy++ } } --> </script> </HEAD> <BODY> <form name="FORM"> <input name="FIELD" onblur="Check();" onblur> <input type="button" onclick=storytest() value="Submit" class="form"> </form> <!-- Script Size: 2.01 KB --> Basically What I want to happen is.. If a email entered that is listed in the reject list they will get an alert. (This currently does this) If a email was entered that's not listed it will submit the form. (Currently does not do this) I am making a login form that is complete but I wanted to add the above code to it.. If you or anyone could make it work the way I explained above I will be very much appreciated. Thanks, Chris I'm looking for something that i can put into my HTML page that will display the following information about the users computer: OS version, browser version, quicktime + flash + adobe reader + java + windows media player + sliverlight versions of the users computer. Can anyone please help??? I don't know a lot about this so something i could copy and paste would be great! I need it to work across all the major browser types. Thanks!!!! hi, can any tell me that which script they are using?? and plz if u have share it Thanx http://www.nation4all.org/mf/ regards Fawad I'm using this javascript on my site, it works perfect. The script changes the background image on the site, just need some mods and I'm no expert. <script language="JavaScript"> <!-- // Copyright 2001 by www.CodeBelly.com // Please do *not* remove this notice. var backImage = new Array(); // don't change this // Enter the image filenames you wish to use. // Follow the pattern to use more images. The // number in the brackets [] is the number you // will use in the function call to pick each // image. // Note how backImage[3] = "" -- which would // set the page to *no* background image. backImage[1] = "/images/bg1.jpg"; backImage[2] = "/images/bg2.jpg" backImage[3] = "/images/bg3.jpg" backImage[4] = "/images/bg4.jpg" backImage[5] = "/images/bg5.jpg" // backImage[4] = ""; this will set to no image // Do not edit below this line. //----------------------------- function changeBGImage(whichImage){ if (document.body){ document.body.background = backImage[whichImage]; } } //--> </script> How Can I set the parameters for the images with the following background-attachment: fixed; background-repeat: no-repeat; background-position: top and make the first image the default background when the site comes up -thanks Eddie Hey, I have a forum, and the forum has an rss feed. I want to take the most 10 recent posts from the feed and insert it into my Home page. I have no clue how to do this. At the moment I have been manually entering the posts as you can see here. All the recent posts on the right side of the page are manually entered by me from my forum. Just wondering if anyone could guide me in a direction to do this programmatically. Hello,I would like help because I cannot run this script in ssh (file transfer). Code: <script type="text/javascript"> var weekdaystxt=["Sun", "Mon", "Tues", "Wed", "Thurs", "Fri", "Sat"] function showLocalTime(container, servermode, offsetMinutes, displayversion){ if (!document.getElementById || !document.getElementById(container)) return this.container=document.getElementById(container) this.displayversion=displayversion var servertimestring=(servermode=="server-php")? '<? print date("F d, Y H:i:s", time())?>' : (servermode=="server-ssi")? '<!--#config timefmt="%B %d, %Y %H:%M:%S"--><!--#echo var="DATE_LOCAL" -->' : '<%= Now() %>' this.localtime=this.serverdate=new Date(servertimestring) this.localtime.setTime(this.serverdate.getTime()+offsetMinutes*60*1000) //add user offset to server time this.updateTime() this.updateContainer() } showLocalTime.prototype.updateTime=function(){ var thisobj=this this.localtime.setSeconds(this.localtime.getSeconds()+1) setTimeout(function(){thisobj.updateTime()}, 1000) //update time every second } showLocalTime.prototype.updateContainer=function(){ var thisobj=this if (this.displayversion=="long") this.container.innerHTML=this.localtime.toLocaleString() else{ var hour=this.localtime.getHours() var minutes=this.localtime.getMinutes() var seconds=this.localtime.getSeconds() var ampm=(hour>=12)? "PM" : "AM" var dayofweek=weekdaystxt[this.localtime.getDay()] this.container.innerHTML=formatField(hour, 1)+":"+formatField(minutes)+":"+formatField(seconds)+" "+ampm+" ("+dayofweek+")" } setTimeout(function(){thisobj.updateContainer()}, 1000) //update container every second } function formatField(num, isHour){ if (typeof isHour!="undefined"){ //if this is the hour field var hour=(num>12)? num-12 : num return (hour==0)? 12 : hour } return (num<=9)? "0"+num : num//if this is minute or sec field } </script> Current Server Time:<span id="timecontainer"></span><br /> Current LA Time:<span id="timecontainer2"></span><br /> Current New York Time:<span id="timecontainer3"></span><br /> <script type="text/javascript"> new showLocalTime("timecontainer", "server-asp", 0, "short") new showLocalTime("timecontainer2", "server-asp", -60, "short") new showLocalTime("timecontainer3", "server-asp", 120, "short") </script> HI - I'm creating a golf website and the clients asked to put a "Golf Tip" on the site that could be changed. A Google search led me to your script (copied below) for "Tip of the Day", which seems to be exactly -- almost -- what I need. Can you tell me how to change the font color (for the tips) from gray to White? Also, is it possible to alter the script to make the tips weekly rather than daily? Thanks much, Richard Code: <table border="0" width="100%" bgcolor="#E8E8E8" cellspacing="0" cellpadding="0"> <tr><td width="100%"> <script> <!-- /* Tip of the day script By JavaScript Kit (http://javascriptkit.com) Over 200+ free scripts here! */ var today_obj=new Date() var today_date=today_obj.getDate() var tips=new Array() //Configure the below variable to contain the "header" of the tip var tiptitle='<img src="../../tip.gif"> <b>JavaScript Tip of the day</b><br />' //Configure the below array to hold the 31 possible tips of the month tips[1]='Tip 1 goes here' tips[2]='Tip 2 goes here' tips[3]='Tip 3 goes here' tips[4]='Tip 4 goes here' tips[5]='Tip 5 goes here' tips[6]='Tip 6 goes here' tips[7]='Tip 7 goes here' tips[8]='Tip 8 goes here' tips[9]='Tip 9 goes here' tips[10]='Tip 10 goes here' tips[11]='Tip 11 goes here' tips[12]='Tip 12 goes here' tips[13]='Tip 13 goes here' tips[14]='Tip 14 goes here' tips[15]='Tip 15 goes here' tips[16]='Tip 16 goes here' tips[17]='Tip 17 goes here' tips[18]='Tip 18 goes here' tips[19]='Tip 19 goes here' tips[20]='Tip 20 goes here' tips[21]='Tip 21 goes here' tips[22]='Tip 22 goes here' tips[23]='Tip 23 goes here' tips[24]='Tip 24 goes here' tips[25]='Tip 25 goes here' tips[26]='Tip 26 goes here' tips[27]='Tip 27 goes here' tips[28]='Tip 28 goes here' tips[29]='Tip 29 goes here' tips[30]='Tip 30 goes here' tips[31]='Tip 31 goes here' document.write(tiptitle) document.write(tips[today_date]) //--> </script> </td></tr></table> <p align="center"><font face="arial" size="-2">This free script provided by</font><br> <font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript Kit</a></font></p> |