Pass Asp variable to java.

Discussion in 'Javascript' started by ckerns@refuse.net, Apr 11, 2005.

  1. Guest

    I have a recordset (ADO) that I loop thru in ASP.

    How can I also assign these values to a java variable?

    tia

    ck
     
    , Apr 11, 2005
    #1
    1. Advertising

  2. Erwin Moller Guest

    wrote:

    > I have a recordset (ADO) that I loop thru in ASP.
    >
    > How can I also assign these values to a java variable?


    A Java variable?
    Are you confusing Java with Javascript maybe?

    If you are, and mean Javascript, try something like this:

    <script type="text/javascript">
    <%
    Dim count
    count = 0
    Do While Not(RS.EOF)
    count = count + 1
    %>
    var myJSvar<%= count %> = "<%= RS("name") %>";
    <%
    Loop
    %>

    </script>


    Then just look into the HTML produced by the ASP if the result fit your
    needs. (View source)

    In the case you really mean Java, things get more complicated, and the
    answer will depend on what you actually want to accomplish. (eg applet)

    Hope this helps,
    Regards,
    Erwin Moller

    >
    > tia
    >
    > ck
     
    Erwin Moller, Apr 11, 2005
    #2
    1. Advertising

  3. Erwin Moller Guest

    Erwin Moller wrote:

    > wrote:
    >
    >> I have a recordset (ADO) that I loop thru in ASP.
    >>
    >> How can I also assign these values to a java variable?

    >
    > A Java variable?
    > Are you confusing Java with Javascript maybe?
    >
    > If you are, and mean Javascript, try something like this:
    >
    > <script type="text/javascript">
    > <%
    > Dim count
    > count = 0
    > Do While Not(RS.EOF)
    > count = count + 1
    > %>
    > var myJSvar<%= count %> = "<%= RS("name") %>";
    > <%


    correction: add RS.movenext here

    > Loop
    > %>
    >
    > </script>
    >
    >
    > Then just look into the HTML produced by the ASP if the result fit your
    > needs. (View source)
    >
    > In the case you really mean Java, things get more complicated, and the
    > answer will depend on what you actually want to accomplish. (eg applet)
    >
    > Hope this helps,
    > Regards,
    > Erwin Moller
    >
    >>
    >> tia
    >>
    >> ck
     
    Erwin Moller, Apr 12, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wayne  Wengert

    Pass a Session Variable from ASP.NET to ASP

    Wayne Wengert, Apr 2, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    13,086
    swati254
    Jun 17, 2008
  2. Ben Kial
    Replies:
    1
    Views:
    705
    Eric Enright
    Nov 15, 2004
  3. Tricky
    Replies:
    0
    Views:
    601
    Tricky
    Mar 19, 2009
  4. Tricky
    Replies:
    0
    Views:
    1,047
    Tricky
    Mar 19, 2009
  5. Reuven
    Replies:
    0
    Views:
    608
    Reuven
    Mar 19, 2009
Loading...

Share This Page