Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

interpreting data via onLoad object

Status
Not open for further replies.

2cxc

Programmer
Aug 29, 2003
245
CA
I have a asp page that has ritten the record set to the page using a counter to address which data goes to which pulled records. I have a swf with a dynamic text box called 'display'. I've managed to trace the variables in the Flash movie and get this out put from the onLoad() method:

amp;total. 2
amp;myMenu1. click to view menu
amp;myAdditional21. asdfasdf
amp;myAdditional11. asdfasdf
amp;mySpecial1. happy hour after 5
amp;myHours1. 9-5pm
amp;myEat1. BOTH
amp;myCusine1. AFRICAN
amp;myPhone1. 321-3214
amp;myDate1. 3
amp;myAddress1. 123 address both
amp;myRname1. african restaurant both
amp;myMenu0. click to view menu
amp;myAdditional20. asdfasdf
amp;myAdditional10. asdfasdf
amp;mySpecial0. happy hour after 5
amp;myHours0. 9-5pm
amp;myEat0. DINE_OUT
amp;myCusine0. AFRICAN
amp;myPhone0. 321-3214
amp;myDate0. 2
amp;myAddress0. 123 address out
myRname0. african restaurant out
onLoad. [type Function]

this is the script i use to obtain the output:
Code:
myVars = new LoadVars ();
myVars.onLoad = function () {
for (var i in this) {
trace (i + ". " +this);
}
};
myVars.load(page.asp");





This is what I have so far, as i'm kinda lost:

Code:
init = function () {
setStyles();
};

myVars = new LoadVars();
myVars.onLoad = displaylogs;
myVars.load("page.asp");

displaylog = function () {
display.htmlText = "";
for (var i = 0; i<this[&quot;total&quot;]; i++) {
display.htmlText += &quot;<font color=\&quot;#0000FF\&quot; size=\&quot;14\&quot;>&quot;+this[&quot;myRname&quot;+i]+&quot;</font><br><br>&quot;;
display.htmlText += &quot;<font size=\&quot;12\&quot;><b>Food: </b>&quot;+this[&quot;myCusine&quot;+i]+&quot;</font><br><br>&quot;;
display.htmlText += &quot;<font size=\&quot;12\&quot;><b>Address: </b>&quot;+this[&quot;myAddress&quot;+i]+&quot;</font><br><br>&quot;;
display.htmlText += &quot;<font size=\&quot;12\&quot;>&quot;+this[&quot;myEat&quot;+i]+&quot;</font><br><br>&quot;;
display.htmlText += &quot;<font size=\&quot;12\&quot;><b>Hours: </b>&quot;+this[&quot;myHours&quot;+i]+&quot;</font><br><br>&quot;;
display.htmlText += &quot;<font size=\&quot;12\&quot;>&quot;+this[&quot;Quantity Reduce: &quot;+i]+&quot;</font><br><br>&quot;;
display.htmlText += &quot;<font size=\&quot;12\&quot;><b>Phone: </b>&quot;+this[&quot;myPhone&quot;+i]+&quot;</font><br><br>&quot;;
display.htmlText += &quot;<font size=\&quot;12\&quot;>&quot;+this[&quot;myAdditional1&quot;+i]+&quot;</font><br><br>&quot;;
display.htmlText += &quot;<font size=\&quot;12\&quot;>&quot;+this[&quot;myAdditional2&quot;+i]+&quot;</font><br><br>&quot;;
display.htmlText += &quot;<font size=\&quot;12\&quot;>Under Heading: : &quot;+this[&quot;myMenu&quot;+i]+&quot;</font><br><br>&quot;;
}
};

setStyles = function () {
myStyleFormat = new FStyleFormat();
myStyleFormat.arrow = 0xFF0000;
myStyleFormat.background = 0xCCCCCC;
myStyleFormat.backgroundDisabled = 0xFFFFFF;
myStyleFormat.face = 0x999999;
myStyleFormat.textSize = 11;
myStyleFormat.highlight3D = 0xffffff;
myStyleFormat.selection = 0xFF0000;
myStyleFormat.selectionDisabled = 0x999999;
myStyleFormat.selectionUnfocused = 0x999999;
myStyleFormat.shadow = 0x333333;
myStyleFormat.textColor = 0x000000;
myStyleFormat.textDisabled = 0xCCCCCC;
myStyleFormat.textSelected = 0x000000;
display.backgroundColor = 0xCCCCCC;
};
init();

 
Also
I have a asp page that has written the record set to the page using a counter called 'counter' to increment each records values, like so (below is a sample recordset written to the asp page):

myRname0=african restaurant out&myAddress0=123 address out&myDate0=2&myPhone0=321-3214&myCusine0=AFRICAN&myEat0=DINE_OUT&myHours0=9-5pm&mySpecial0=happy hour after 5&myAdditional10=asdfasdf&myAdditional20=asdfasdf&myMenu0=click to view menu&myRname1=african restaurant both&myAddress1=123 address both&myDate1=3&myPhone1=321-3214&myCusine1=AFRICAN&myEat1=BOTH&myHours1=9-5pm&mySpecial1=happy hour after 5&myAdditional11=asdfasdf&myAdditional21=asdfasdf&myMenu1=click to view menu&total=2

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top