473,396 Members | 1,789 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,396 software developers and data experts.

Pass Asp variable to java.

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

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

tia

ck
Jul 23 '05 #1
2 1439
ck****@refuse.net 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


Jul 23 '05 #2
Erwin Moller wrote:
ck****@refuse.net 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


Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Nelson Broat | last post by:
In jsp land you can have the following: <% String name = "Nelson"; %> Hi, my name is <%= name %>. Such that, in your browser you see:
11
by: Vanessa | last post by:
Hi, I would like to know whether there's any way for me to pass an object by reference to another form? Regards Vanessa
3
by: john woo | last post by:
Hi in JSP, it's easy to pass value from java-variable to javascript-variable, like js_function(a) { a=<%java-class.A%> } I'm wondering how is the other way around? I tried
2
by: mskorik | last post by:
Hello all, Is it possible to pass 2 SQL statements in a single call ? I keep SQL statements in a text file and usually there are couples of several SQL statements that represent a named unit...
3
by: Hermit Dave | last post by:
Hi, Trying to pass a value to user control within a page. 1. Couldnt find a way to pass it from code behind file. 2. Trying to pass it from aspx page... using EditURL='<% "mypage.aspx?myvar=" +...
3
by: Boki | last post by:
Hi, Could you please advice, can javascript accept this kind of code? function resone(cnt) { alert("document.all.txt_note"+cnt) // cnt is the textbox index
10
by: Robert Dailey | last post by:
Hi, I noticed in Python all function parameters seem to be passed by reference. This means that when I modify the value of a variable of a function, the value of the variable externally from the...
10
by: mike4722 | last post by:
I wish to have the form to be able to automatically select the radio button based on the logic of HTML/php variable. example show below: javascript: function autoForm(value) { var myForm =...
2
by: rekhaagroya | last post by:
In some jsp I wanted to pass an array variable in the method doValidate of ValidationApplet. I have defined a variable in the function validateAll() as below, var comments_arr =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
tracyyun
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 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.