|
Here's one for you Net.Data gurus,
I'm trying to load the contents of a Net.Data Table into a javascript
array. If I run the script, I am using a net.data variable derived from the
DTW_TB_ROWS function to control the Javascript loop, If I view the source,
I can see the variables value in the FOR statement. I am using the
DTW_TB_GETV function to retrieve the value of the row. Again if I view the
source, I am seeing the value of the first row in the assignment statement,
however it looks like there is only one iteration.
Here is the output of the Net.Data Macro:
%html(testjscr) {
@qrytext(texttable)
@DTW_TB_ROWS(texttable,rws)
<html>
<head><title>Text Test</title><head>
<body>
<h1> Here is your Scrolling Text.</h1>
<center>
<script language="javascript">
textarr = new array()
var i = 0
for(i=1;i==$(rws);i++) { <---- The value of $(rws) is = to the
number of rows in the table
@DTW_TB_GETV(texttable,x,"1",variable)
@DTW_ADD(x,"1",x);
textarr[i] = $(variable); <--- The value of $(variable) is = to
the text in the first row.
}
for(i=1;i==$(rws);i++)
document.write(textarr[i] + "<br>");
</script>
</center>
</body>
</html>
%}
This is the Generated HTML Source:
<html>
<head><title>Text Test</title><head>
<body>
<h1> Here is your Scrolling Text.</h1>
<center>
<script language="javascript">
textarr = new array()
var i = 0
for(i=1;i==3;i++)
;
;
textarr[i] = THIS IS TEXT RECORD 1;
for(i=1;i==3;i++)
document.write(textarr[i] + "<br>");
</script>
</center>
</body>
</html>
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.