Hi,
i have a javascript code. I want to convert into VBscript.
pls
help me
Javascript Code: -
<!-- TWO STEPS TO INSTALL VIRGENERE ENCRYPTION:
-
-
1. Copy the coding into the HEAD of your HTML document
-
2. Add the last code into the BODY of your HTML document -->
-
-
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
-
-
<HEAD>
-
-
<SCRIPT LANGUAGE="JavaScript">
-
<!-- Original: Francisco Ryan Tolmasky (iopossum@mailcity.com) -->
-
<!-- Web Site: http://iopossum.tripod.com -->
-
-
<!-- This script and many more are available free online at -->
-
<!-- The JavaScript Source!! JavaScript Source: Free JavaScripts, Tutorials, Example Code, Reference, Resources, and Help -->
-
-
<!-- Begin
-
var TID = 0;
-
var longer = 0;
-
var thirdwrite = "";
-
var alphabet = new Array("0@","1#","2$","3%","4^","5&","6*","7 = ","8-","9+","Aa","Bb","Cc","Dd","Ee","Ff","Gg","Hh","Ii","Jj","Kk","Ll","Mm","Nn","Oo","Pp","Qq","Rr","Ss","Tt","Uu","Vv","Ww","Xx","Yy","Zz");
-
function preTime(coco, uinput, question) {
-
longer = coco.length - 1;
-
placement = 0;
-
ref = 0 ;
-
secondWrite = "";
-
firstWrite = "";
-
thirdWrite = "";
-
code1(coco, uinput, longer, question);
-
}
-
function findshift(letter) {
-
for (i = 0; i < 36; i++) {
-
if ((alphabet[i].substring(0,1) == letter) || (alphabet[i].substring(1,2) == letter)) {
-
if (alphabet[i].substring(0,1) == letter) {
-
x = 0;
-
}
-
if (alphabet[i].substring(1,2) == letter) {
-
x = 1;
-
}
-
return i;
-
}
-
}
-
}
-
function check(letter) {
-
bill = "no";
-
for (i = 0; i < 36; i++) {
-
if ((alphabet[i].substring(0,1) == letter) || (alphabet[i].substring(1,2) == letter)) {
-
bill = "yes";
-
}
-
}
-
if (bill == "yes") {
-
return true;
-
}
-
else {
-
return false;
-
}
-
}
-
function fixoffset(takin) {
-
if (takin > 35) {
-
return (takin - 36);
-
}
-
else {
-
return takin;
-
}
-
}
-
function code1(inval1,inval2,inval3,sage) {
-
if (check(inval2.charAt(placement))) {
-
if (check(inval1.charAt(ref))) {
-
if (sage == 0) {
-
shift = findshift(inval1.charAt(ref));
-
}
-
if (sage == 1) {
-
shift = 36 - findshift(inval1.charAt(ref));
-
}
-
}
-
else {
-
shift = 0;
-
}
-
orig = findshift(inval2.charAt(placement));
-
firstWrite = firstWrite+alphabet[fixoffset(orig+shift)].charAt(x);
-
}
-
else {
-
firstWrite = firstWrite+inval2.charAt(placement);
-
}
-
secondWrite = inval2.substring(placement+1,inval2.length+1);
-
thirdWrite = firstWrite+secondWrite;
-
document.inputo.written.value = thirdWrite;
-
placement++;
-
if (ref == inval3) {
-
ref = 0
-
}
-
else {
-
ref++;
-
}
-
if (placement == (inval2.length)) {
-
window.clearTimeout(TID);
-
return false;
-
}
-
one = inval1;
-
two = inval2;
-
three = inval3;
-
goer = sage;
-
TID = window.setTimeout("code1(one, two, three, goer)", 0);
-
}
-
// End -->
-
</script>
-
</HEAD>
-
-
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
-
-
<BODY>
-
-
<center>
-
<form name="inputo">
-
<textarea name=written rows=12 cols=40>Type message to encode here</textarea>
-
<br>
-
Code Phrase:<input type=text name=codeWord value="code phrase here">
-
<input type=button value="Encode" onClick="preTime(codeWord.value,written.value, 0);">
-
<input type=button value="Decode" onClick="preTime(codeWord.value,written.value, 1);">
-
</form>
-
</center>
-
-
<p><center>
-
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
-
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
-
</center><p>
-
Thanks,
Murugavel
2 7714 gits 5,390
Recognized Expert Moderator Expert
what help do you need exactly? just have a look at the code you posted and rewrite it in vb. in case you have specific problems with the JavaScpript code, then post back here so that we could explain the JavaScript-statements that you want to have explained ... but certainly noone will just rewrite that script for you.
kind regards
acoder 16,027
Recognized Expert Moderator MVP
Hmm... why would you even want to convert from JavaScript to VBScript? JavaScript works in more or less all browsers while VBscript is limited to a single browser. Now I could understand if the request was the other way round, i.e. from VBScript to JavaScript.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: John Davis |
last post by:
When I create new documents in Dreamweaver, there are several choices for
ASP creation:
ASP JavaScript: run at client side??
ASP VBScript: run at server side??
ASP.NET C#
ASP.NET VB
I don't...
|
by: Bill |
last post by:
I need to convert a variable, nNum, into a two-character string. nNum is
always less than 100.
If nNum is 0, the string needs to be "00", if it's 1, it needs to be "01",
if it's 34, it needs to...
|
by: davidgordon |
last post by:
Hi,
I have some pages with this VBScript code, which obviously does not
work in Firefox. How can I convert this to Javascript in order for my
web page to work in Firefox ? It basically fills a...
|
by: darcykahle |
last post by:
Is there any way of converting an existing access form into html
format? The form in question has built-in visual-basic code, which
gets commented out when you use the "save as" method, instead of...
|
by: thinktwice |
last post by:
in my script file , i need call a method of a atl com
module(implemented in vc++), which returan an safearray. i don't know
how to convert it into array in jscript. i have tried serveral ways to...
| |
by: Doug van Vianen |
last post by:
Hi,
I often like to include some JavaScript coding in my web pages to make them
more interesting. Unfortunately, even when this coding is as simple as a
check to see what the display width is in...
|
by: rishabhshrivastava |
last post by:
Hello All,
How can I convert a value to Double in JavaScript??? In vbscript i
believe its done as
cDbl(Value)
I tried lots of way but getting a value of "NaN".
Any suggestions/ideas will...
|
by: FAQ server |
last post by:
-----------------------------------------------------------------------
FAQ Topic - How do I convert a Number into a String with
exactly 2 decimal places?...
|
by: sathyan8294 |
last post by:
what is websites for convert javascript to vbscript?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |