Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 07-26-2002, 04:14 PM   #1
Registered User
Join Date: Jul 2002
Posts: 1
Unhappy PHP and listbox problems

I am trying to populate a listbox component through MMX dynamicaly with PHP. I have the PHP code working and it returns a string formatted:

$rString = "n=".$num;
$rString .= "&id".$i."=".$row['id']."&title".$i."=".$row['title'];
$rString .= "&description".$i."=".$row['description']."&author".$i."=".$row['author'];
$rString .= "&submitted".$i."=".$row['submitted']."&caption".$i."=".$row['caption'];

it works!

I need to dynamically populate the listbox with the title. I am then going to do onSelect function to populate the other data into other text fields on the screen. Very straight-forward.

I can't get the darn listbox to populate. Here is my actionscript:
function showContent()
for(var i=0; i< this.n; i++){

// Create new load vars object c for data transfer
var a = new LoadVars();
a.onLoad = showContent;


sarahstim is offline   Reply With Quote
Old 07-26-2002, 04:33 PM   #2
Senior Member
Join Date: Apr 2002
Location: Yellowknife
Posts: 136

Well, for a start, remember you're passing a string.

You need to convert any vars
that you want to treat as number.

For example, this.n is still a string.

Try parseInt(n) before the for loop.
snowedin is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
listbox variable, having trouble ishould Components 1 01-17-2005 02:46 PM
Listbox - Array - PHP TRPlace Components 0 10-20-2004 07:07 PM
retrieving varible data from listbox content irongrip Components 7 07-17-2003 01:16 PM
populate listBox w/variables from PHP/mySQL irongrip Server-Side Scripting 18 07-14-2003 05:30 PM
Passing array PHP to Flash MX djnbh Server-Side Scripting 1 12-13-2002 05:40 PM

All times are GMT. The time now is 08:03 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.