473,385 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Javascript Read Content Directory

Hi,

How can I read the Content of a directory in my HTML-structure, and
show it with an alertbox or something.

What I actually want, a Photo-Page.

If i load the page,
My browser have to check how many directories there are in the map
ALBUMS. So if i add an album later I don't have to adjust my code.
Present those as links on my page. And if I hit one of those links. It
has to show the pictures in that specific album. Design is for later.

So this would be my structure
index.htm
photo.htm
- DIR: ALBUMS
- SUBDIR: ALBUM1
- photo1.jpg
- photo2.jpg
- picture.jpg
- SUBDIR: ALBUM2
- .....

And so on
So if I add an album or a picture in one of the albums I just want to
upload my directories with CuteFTP, and not change any code.

Greetings
Hannes
Jun 27 '08 #1
5 2309
Hannes wrote:
How can I read the Content of a directory in my HTML-structure, and
show it with an alertbox or something.
[...]
So if I add an album or a picture in one of the albums I just want to
upload my directories with CuteFTP, and not change any code.
Asking the same question[1] all over again is not going to result in better
answers. The same good answer[2] remains: you also need a server-side
application for this; maybe, but probably better not, written in "JavaScript".

Client-side JavaScript alone cannot do this as it cannot "know" about the
server-side directory structure without the server "telling" it about it.

You have already been asked to learn the basics and you have been pointed to
the newsgroup where general Web authoring questions are on-topic. Further
disregard of that request is considered impolite and therefore may result in
your postings being filtered out by individual subscribers. You have been
warned.[3]

[1] <news:fe**********************************@l42g200 0hsc.googlegroups.com>
[2] <news:48**************@PointedEars.de>
[3] <http://jibbering.com/faq/>
PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee
Jun 27 '08 #2
On 14 mei, 21:04, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
Hannes wrote:
How can I read the Content of a directory in my HTML-structure, and
show it with an alertbox or something.
[...]
So if I add an album or a picture in one of the albums I just want to
upload my directories with CuteFTP, and not change any code.

Asking the same question[1] all over again is not going to result in better
answers. *The same good answer[2] remains: you also need a server-side
application for this; maybe, but probably better not, written in "JavaScript".

Client-side JavaScript alone cannot do this as it cannot "know" about the
server-side directory structure without the server "telling" it about it.

You have already been asked to learn the basics and you have been pointed to
the newsgroup where general Web authoring questions are on-topic. *Further
disregard of that request is considered impolite and therefore may result in
your postings being filtered out by individual subscribers. *You have been
warned.[3]

[1] <news:fe**********************************@l42g200 0hsc.googlegroups.com>
[2] <news:48**************@PointedEars.de>
[3] <http://jibbering.com/faq/>

PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee
I maybe explained the thing about Client wrong.
I just mean my customer has to be able to just upload his directory
structure with albums with FTP. So he can easily adjust his website.
There is no server involved in this.
Jun 27 '08 #3
Hannes wrote:
I just mean my customer has to be able to just upload his directory
structure with albums with FTP. So he can easily adjust his website.
^^^ ^^^^^^^
There is no server involved in this.
At least an FTP and an HTTP server is involved in this, of course.
Score adjusted

PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
Jun 27 '08 #4
On 14 mei, 23:09, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
Hannes wrote:
I just mean my customer has to be able to just upload his directory
structure with albums with FTP. So he can easily adjust his website.

* * * * * * * * * * * * * * *^^^ * * ** * * * * * * * * * * *^^^^^^^
There is no server involved in this.

At least an FTP and an HTTP server is involved in this, of course.

Score adjusted

PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
* * navigator.userAgent.indexOf('MSIE 5') != -1
* * && navigator.userAgent.indexOf('Mac') != -1
) *// Plone, register_function.js:16
But for example i have the following simple code,

<img src="knopfler/knopfler.jpg" />
<img src="knopfler/knopfler1.jpg" />
<img src="knopfler1/knopfler2.jpg" />
<img src="knopfler1/knopfler3.jpg" />
<img src="knopfler2/knopfler4.jpg" />
<img src="knopfler2/knopfler5.jpg" />
<img src="knopfler2/knopfler6.jpg" />
<img src="knopfler3/knopfler7.jpg" />

This is manual code. But is there no way I can let this to do by
javascript.
I can't use something else, my webspace does not support this.

Jun 27 '08 #5
Hannes wrote:
[...] Thomas 'PointedEars' Lahn [...] wrote:
>Hannes wrote:
>>I just mean my customer has to be able to just upload his directory
structure with albums with FTP. So he can easily adjust his website.
^^^ ^^^^^^^
>>There is no server involved in this.
At least an FTP and an HTTP server is involved in this, of course.
[...]

But for example i have the following simple code,

<img src="knopfler/knopfler.jpg" />
<img src="knopfler/knopfler1.jpg" />
<img src="knopfler1/knopfler2.jpg" />
[...]
The trailing `/' does not belong there unless its XHTML (and you do not want
that), and the required `alt' attribute is missing.

http://validator.w3.org/
This is manual code. But is there no way I can let this to do by
javascript.
Well, if your Web server provided a directory listing you could parse this,
and generate the `img' elements dynamically. But then nothing worked
without client-side script support, so you really do not want that.
I can't use something else, my webspace does not support this.
Get better webspace, then.

And please trim your quotes as described e.g. in the FAQ Notes.
PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Jun 27 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

53
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is...
3
by: M Wells | last post by:
Hi All, Just wondering how you go about changing the value of a session cookie via javascript? I have a PHP page that sets a session cookie when it first loads. I'd like to be able to change...
6
by: Juan Manuel Ramollino | last post by:
Greetings everyone! I am creating a webcontrol that reads one or more directorie's content and displays all the filenames (tipically PDFs or PPTs) so that the user can select the desired one and...
3
by: Joseph Ferris | last post by:
Hello everyone. I recently reloaded my system, and I am now having problems getting one of my client's sites running. I pulled a copy of the development tree for the project out of subVersion...
2
Frinavale
by: Frinavale | last post by:
I am attempting to use embedded resources in an Ajax Enabled ASP.NET Web Application. I'm using Visual Studio 2008 and VB.NET server side code. The project is called "EmbeddedResources" with the...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.