473,322 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Help with Conversion from javascript to vbscript

I know its an odd question, but I need some help converting javascript to vbscript. I understand from my readings that its going backwards, but my professor requires it for one of my class. Here is the javascript:

Expand|Select|Wrap|Line Numbers
  1. sfHover = function() 
  2.       {
  3.           var sfEls = document.getElementById("Lab2MenuJS").getElementsByTagName("LI");
  4.           for (var i=0; i < sfEls.length; i++) 
  5.           {
  6.               sfEls[i].onmouseover=function() 
  7.               {
  8.                   this.className+=" jshover";
  9.               }
  10.               sfEls[i].onmouseout=function() 
  11.               {
  12.                   this.className=this.className.replace(new RegExp(" jshover\\b"), "");
  13.               }
  14.           }
  15.       }
  16.       if (window.attachEvent) window.attachEvent("onload", sfHover);
  17.  
Its the script for Son of suckerfish , and this is what I have so far:

Expand|Select|Wrap|Line Numbers
  1. sfHover = function() 
  2.          dim sfEls = document.getElementById("Lab2MenuVB").getElementsByTagName("LI")
  3.           for i=0 to sfEls.length
  4.              if sfEls(i).onmouseover=function() then
  5.                 sfEls(i).className = " vbhover"
  6.              else
  7.                 sfEls(i).className = className.replace(new RegExp(" vbhover\\b"), "")
  8.        End Function
  9.       if (window.attachEvent) window.attachEvent("onload", sfHover)
  10.  
Any helps would be appreciated. Thank you.
Aug 15 '07 #1
1 1602
acoder
16,027 Expert Mod 8TB
The only problem is this is a Javascript forum, not a vbscript one. If it were the "right" way round, from vbscript to Javascript, I could have been of help. If someone here knows a bit of vbscript, they might be able to help.

Just one question though: is this a class assignment? If so, please read the section in the posting guidelines on coursework and homework assignments.
Aug 15 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
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...
8
by: chuck clark | last post by:
Hi, I am sorry if this is not the most appropriate group to ask this in (if not, please point me in the right direction). I am following examples from this page,...
13
by: Alex Molochnikov | last post by:
Is there any way to find out programmatically if Javascript is supported/enabled in a browser? By "programmatically" I mean on the Java servlet side. TIA Alex Molochnikov Gestalt Corporation
2
by: Goober | last post by:
I have the following default.aspx page that works properly. However, what I want to do is to link the graphics within it (that are hard coded now in the default web page) to our corporate...
11
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...
5
by: Anns via AccessMonster.com | last post by:
My establishment has about 20 ms access db's that will be converted over (see subject). When we pull all the BE's over to SQL and the FE's on Sharepoint (.net) surely we don't have to change...
10
by: Shadow Lynx | last post by:
That subject packs a whallop, so let me explain in better detail what's happening and how it relates to ASPX pages... In a nutshell, if the first <script /on a page is of type "text/vbscript",...
9
by: Erwin Moller | last post by:
Hi, Can anybody comment on this? In comp.lang.php I advised somebody to skip using: <script language="javascript"> and use: <script type="text/javascript"> And mr. Dunlop gave this response:
18
by: Andrew Wan | last post by:
I have been developing web applications with ASP & Javascript for a long time. I have been using Visual Studio 2003.NET. While VS2003 is okay for intellisense of ASP & Javascript, it's still not...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.