Pass Asp variable to java.

C

ckerns

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

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

tia

ck
 
E

Erwin Moller

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
 
E

Erwin Moller

Erwin said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top