| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Jul 2002
Posts: 1
|
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++){ listBox_lb.addItem(title[i],i); } } // Create new load vars object c for data transfer var a = new LoadVars(); a.load("flashmx_dbPassReturn.php","POST"); a.onLoad = showContent; ________________________________________________ HELP PLEASE... -t |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Apr 2002
Location: Yellowknife
Posts: 57
|
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. |
|
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| listbox variable, having trouble | ishould | Components | 1 | 01-17-2005 03:46 PM |
| Listbox - Array - PHP | TRPlace | Components | 0 | 10-20-2004 08:07 PM |
| retrieving varible data from listbox content | irongrip | Components | 7 | 07-17-2003 02:16 PM |
| populate listBox w/variables from PHP/mySQL | irongrip | Server-Side Scripting | 18 | 07-14-2003 06:30 PM |
| Passing array PHP to Flash MX | djnbh | Server-Side Scripting | 1 | 12-13-2002 06:40 PM |