Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Sal77

macrumors newbie
Original poster
May 22, 2008
7
0
hi everyone,
I am new to this forum and also quite new to programming and dash code.
I am trying my first webapp for iphone to stream video files from a webserver, till now I can stream the files into iphone but using direct paths that lead to the files, but I want to create a dynamic list to automatically update the list of files when and if I add or delete some of them.
I need some help cause i can't get to list the names of files contained in a directory inside the webserver, to be displayed inside an edge-to-edge list.
 

Sal77

macrumors newbie
Original poster
May 22, 2008
7
0
thanks for reply

I would like to use javascript but seems quite hard for me, so any other solution is highly appreciated.
I am using dashcode and created a webapp from custom template, and working with a edge-to-edge list.
 

Cromulent

macrumors 604
Oct 2, 2006
6,812
1,100
The Land of Hope and Glory
I would like to use javascript but seems quite hard for me, so any other solution is highly appreciated.
I am using dashcode and created a webapp from custom template, and working with a edge-to-edge list.

I know very little about Javascript but I would be very very surprised if there was not a function for doing this in its library somewhere. Just look for something that lists directory contents and print the output to the HTML page.
 

Sal77

macrumors newbie
Original poster
May 22, 2008
7
0
thanks again

My problem is how to collect the names of files on that folder and to use those inside a ui list in dashcode (edge-to-edge list), I think I should create an array but not so sure.
 

dws90

macrumors regular
Jan 16, 2008
122
0
JavaScript is client-side, and therefore isn't really meant for listing files on a remote server. Although I imagine it's conceivably possible, using a client-side language to access the server is a bit silly.

You really want to look into a server side language like PHP or Perl (PHP's easier to pick up and use). If you still want to make the interface, you can use JavaScript to call the server-side script (AJAX).
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
this is definitely a server side job. You just need to generate a list of li elements or some other html element on the server. What language you do this in will depend on your server. For a task like this anything will work. Don't worry with trying to get the items via AJAX. I doubt the video list will change so often that clients will need to be refreshing "dynamically".

What kind of server is this on? Are you familiar with perl, php, C, etc.?

-Lee
 

Sal77

macrumors newbie
Original poster
May 22, 2008
7
0
thanks

The server is apache, I need the dynamic feature because files will be uploaded on a daily basis. I am a bit familiar with C but never used other, I am an hobbist on this.
 

psingh01

macrumors 68000
Apr 19, 2004
1,586
629
I'm pretty sure php can read the files in a directory on the server side. Have your javascript make a request a php page that outputs the file names.
 

Sal77

macrumors newbie
Original poster
May 22, 2008
7
0
no i am trying to find some more info how to do it but I really don't have idea how to...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.