473,788 Members | 2,726 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

LoadVars - getting several variables with for-loop

11 New Member
Hi!

I have like a 100 names in a database table, I want to get
them with a LoadVars in actionscript.

I wonder if there is a way of writing instead of this:

Expand|Select|Wrap|Line Numbers
  1. myData = new LoadVars();
  2.  
  3. myData.onLoad = function() {
  4.  textfield1.text = myData.name1;
  5.  textfield2.text = myData.name2;
  6.  textfield3.text = myData.name3;
  7.  ...
  8.  textfield100.text = myData.name100;
  9. };
  10.  
something mor like this:

Expand|Select|Wrap|Line Numbers
  1. myData = new LoadVars();
  2. myData.onLoad = function() {
  3.  for( i = 1; i < 101; i++){
  4.   this["textfield"+i].text = myData.????;
  5.  }
  6. };
  7.  
I wonder what I can write instead of ???? so I don't need to write
a 100 lines of code.

Thx
Jan 9 '08 #1
1 2814
ernieweaselfat
1 New Member
Hi,

Did you ever figure out how to do this?

I am looking for the exact same solution.

Thanks!
Feb 20 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

17
4691
by: John Hunter | last post by:
I have a largish data set (1000 observations x 100 floating point variables), and some of the of the data are missing. I want to try a variety of clustering, neural network, etc, algorithms on the data, and to keep life simple I want to reduce the dimensions of the matrix so that I have no missing values, since not all the algorithms are able to handle them and there is sufficient redundancy in the variables that I can afford to lose...
3
2334
by: Steve Mauldin | last post by:
This is a standard ASP application that has several pages at the root withthe global.asa. I set a session variable session("accountid") = "123456" within an asp page and then response.redirect to the next page and immediately response.write session("accountid") and I get back nothing. But if I set a session variable session("accountid") = "123456" within an asp page and response.redirect to a page in a sub directory and immediately...
4
1455
by: Andrew Poulos | last post by:
If I do something like this: Cnst = function() { // blah } Cnst.prototype.meth = function() { // blah } var foo = new Cnst()
9
2046
by: deko | last post by:
What is it with these dates? What are they so much trouble? All I want to do is subtract an hour, but not if that makes dtmTest less than dtmClt. Dim dtmStart As Date Dim dtmEnd As Date Dim dtmCtl As Date Dim dtmTest As Date Me!cbxEndTime.Requery Me!cbxStartTime.Requery
1
1400
by: Dan | last post by:
page1 - submits the form, page 2 - how do I grab the form variables ?
9
3193
by: Randy | last post by:
Hello, I'm having a strange problem. I've got a .NET web app which uses Session variables. Sometime, not all the time, they get cross threaded...that is...one user will have another user's Session variable(s) data assigned to them. I can't figure out why. I've read that other people are having this problem too but I haven't found a resolution yet. Can someone please tell me how I might go about fixing this? Thanks
13
1878
by: Ørjan Langbakk | last post by:
I wanna make a file that holds the complete pricelist for a small webshop (yes, I know that a database in the background would be a lot simpler, but that is not an option today, unfortunately). I'm thinking something like creating a file that holds the productname and the price, and then just get the price from the other pages that needs it. (Typically an overview page of all the products in a category, and the spesific product pages). ...
3
8073
by: JohnGos | last post by:
Since around 10th May (a couple of days after the recent IE autoupdate), a web application which has worked without problem for several years has developed intermittent problems with data posted from a form not being received by our server scripts. Having not been able to find the cause of this, we firstly tried the application on three different servers (all Linux) at different ISPs and the same problems occurred. We then completely...
2
1815
by: Head In A Pan | last post by:
Hello! Here is something I assume is relatively simple but have never bothered to find out - I'm not finding the answer anywhere! All I am trying to do is this: Have a thumbnail image acting as a button - sitting on my HTML page. When the user clicks it, the button uses the POST method to send a specified variable.
1
2031
by: Tarik Monem | last post by:
Hi everyone and I hope that you can help. I am trying to send a value of a cell within a Datagrid to my php file which has a simple sql query: here's the php: <? $server = "localhost";
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10175
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9969
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5399
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4070
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3675
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.