× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




Marv,

I've used net.data to pull data from an AS400 table and load an array in
Javascipt.

Here is the Macro:

%define database="*LOCAL"
%define texttable = %table
%define DTW_DEFAULT_REPORT = "NO"
%define rows = ""
%define y = "1"
%define x = "1"
%define count = "1"
%define output = ""


%function(DTW_SQL) qrytext(OUT t1) {
 select textdata,textseq From mwlib.texttbl where acrec = 'A' order by
Textseq
 %}

%html(output) {
 @qrytext(texttable)
 @DTW_TB_ROWS(texttable,rws)

   <script language="javascript">
    textarr = new Array()
    var idx = 0
   </script>
 %while(x <= rws) {
   @DTW_TB_GETV(texttable,x,"1",var)
   @DTW_CONCAT("""",var,var)
   @DTW_CONCAT(var,"""",var)
   @DTW_ADD(x,"1",x)
   <script language="javascript">
   textarr[idx] = $(var)
   idx++
   </script>
 %}

<html>
<head><title>Scrolling Test</title><head>
<body background=$(background)>
<center>
<Form  action="" method="POST" id="form01" name="form01">
<input type="TEXT" size="80" name="text01">

 <script language="javascript">
  var x=0

  self.setInterval('displayText()',2000)

 function displayText() {
  document.form01.text01.value=textarr[x]
  x++
  if(x>idx-1)
   x=0;
 }
 </script>

</form>
</body>
</html>
%}

I Hope it helps,

Mark


Mark Walter
Sr. Programmer/Analyst
Hanover Wire Cloth a div of CCX, Inc.
mwalter@hanoverwire.com
http://www.hanoverwire.com
717.637.3795 Ext.3040


                                                                                
                                        
                    marv.edmondson@mho                                          
                                        
                    .com                      To:     JAVA400-L@midrange.com    
                                        
                    Sent by:                  cc:                               
                                        
                    owner-java400-l@mi        Subject:     Another try on 
JavaScript                                    
                    drange.com                                                  
                                        
                                                                                
                                        
                                                                                
                                        
                    08/07/01 12:22 PM                                           
                                        
                    Please respond to                                           
                                        
                    JAVA400-L                                                   
                                        
                                                                                
                                        
                                                                                
                                        




Can you build a select list (drop down box) dynamically from a physical
file
on the AS400 using JavaScript?
Does anyone have an easier solution? I do not want to hardcode a country
drop
down select
list.


---------------------------------------------
This message was sent using MHO WebMail.
http://www.mho.net


+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---




+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.