FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

javascript to open files

 


alalex
how can i use javascript to look into a directory for pictures, count the number, and then display them into a web?

The directory is /images/pictures
The pictures name is 1,2,3,4...

And then, into images/pictures there are more folders, is it possible to make javascript display a title with the name of the folder and then the pictures that are in that folder???

I would like to display a message like "Loading pictures" And then make the pictures appear all in a column.
blueray
hi, for client-side javascript. You can not do that. Or use asp or asp.net
or php etc.

Hope this help.
ritesh26
hi,
for your problem the awnser is simple. javascript is used for client side language. and security reason javascript not permite to write any code on client side.
You can read and write files o directory on server side with any server side language like php, jsp, asp etc.
Mosquito.Tyler
I would recommend using PHP because it is free. With PHP the task you are attempting is easy. Could probably be done with a single function Smile
alalex
ok i will use php then. i know pretty well how to do it in php, bt i was trying to make it in javascript because im not sure that the server that will have the page supported php....
thanks anyways!
alkutob
I may only advice you to visit this link and start searching about some

scripts that may be nearly as the options you need .

here is the link . I hope it may help

http://javascriptkit.com/cutpastejava.shtml
Agent ME
Mosquito.Tyler wrote:
I would recommend using PHP because it is free. With PHP the task you are attempting is easy. Could probably be done with a single function Smile

You can't do this with PHP - PHP is server side, all code runs on the server.
alalex
i just found the perfect script!
http://javascriptkit.com/script/script2/phpviewer/
it works and it combines php and javascript!
thanks alkutob!!
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.