Web Analytics Made Easy -
StatCounter How to translate this into Javascript - CodingForum

Announcement

Collapse
No announcement yet.

How to translate this into Javascript

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to translate this into Javascript

    <%@LANGUAGE="VBSCRIPT"%>
    <!--#include file="../../../Connections/ultradev.asp" -->
    <%
    set rsGroups = Server.CreateObject("ADODB.Recordset")
    rsGroups.ActiveConnection = MM_ultradev_STRING
    rsGroups.Source = "SELECT id, partname FROM child_dropdown_groups ORDER BY id ASC"
    rsGroups.CursorType = 0
    rsGroups.CursorLocation = 2
    rsGroups.LockType = 3
    rsGroups.Open()
    rsGroups_numRows = 0
    %>
    <%
    Dim rsParts__myGroup
    rsParts__myGroup = "1"
    if (Request.Form("myGroup") <> "") then rsParts__myGroup = Request.Form("myGroup")
    %>
    <%
    set rsParts = Server.CreateObject("ADODB.Recordset")
    rsParts.ActiveConnection = MM_ultradev_STRING
    rsParts.Source = "SELECT id, grouptype, description FROM child_dropdown_parts WHERE grouptype = '" + Replace(rsParts__myGroup, "'", "''") + "' ORDER BY id ASC"
    rsParts.CursorType = 0
    rsParts.CursorLocation = 2
    rsParts.LockType = 3
    rsParts.Open()
    rsParts_numRows = 0
    %>
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body bgcolor="#FFFFFF" text="#000000">
    <form name="form1" method="post" action="">
    <div align="center"><font face="Arial, Helvetica, sans-serif" size="2" color="#000000"><font face="Verdana, Arial, Helvetica, sans-serif">Please
    Select a Group:</font></font>
    <select name="myGroup" onChange="this.form.submit();">
    <option selected>Please Select</option>
    <%
    While (NOT rsGroups.EOF)
    %>
    <option value="<%=(rsGroups.Fields.Item("id").Value)%>">
    <%=(rsGroups.Fields.Item("partname").Value)%></option>
    <%
    rsGroups.MoveNext()
    Wend
    If (rsGroups.CursorType > 0) Then
    rsGroups.MoveFirst
    Else
    rsGroups.Requery
    End If
    %>
    </select>
    <input type="hidden" name="step" value="2">
    </div>
    </form>
    <br>
    <% If Request.Form("myGroup") <> "" Then %>
    <form name="form2" method="post" action="mypage.asp">
    <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Please
    Select a Part:
    <select name="myPart" onChange="this.form.submit();">
    <option selected>Please Select...</option>
    <%
    While (NOT rsParts.EOF)
    %>
    <option value="<%=(rsParts.Fields.Item("id").Value)%>" ><%=(rsParts.Fields.Item("description").Value)%></option>
    <%
    rsParts.MoveNext()
    Wend
    If (rsParts.CursorType > 0) Then
    rsParts.MoveFirst
    Else
    rsParts.Requery
    End If
    %>
    </select>
    <input type="hidden" name="myGroup" value="<%=Request.Form("myGroup")%>">
    <input type="hidden" name="step" value="3">
    </font></div>
    </form>
    <% End If %>
    <br>
    </body>
    </html>
    <%
    rsGroups.Close()
    %>
    <%
    rsParts.Close()
    %>

  • #2
    It seems to be an ASP page with references to a database of some sort. I dont think this can be translated to client side Javascript. You would need something on the server side to access the database.
    Nobody is Perfect. I am Nobody.

    Comment


    • #3
      I think heprox wants server-side Javascript or JScript.
      It can be translated but I think we should be told of the reason behind it.
      Glenn
      vBulletin Mods That Rock!

      Comment

      Working...
      X