473,830 Members | 2,257 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2341
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******* *************** ************@l4 2g2000hsc.googl egroups.com>
[2] <news:48******* *******@Pointed Ears.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...@we b.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******* *************** ************@l4 2g2000hsc.googl egroups.com>
[2] <news:48******* *******@Pointed Ears.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 bugRiddenCrashP ronePieceOfJunk = (
navigator.userA gent.indexOf('M SIE 5') != -1
&& navigator.userA gent.indexOf('M ac') != -1
) // Plone, register_functi on.js:16
Jun 27 '08 #4
On 14 mei, 23:09, Thomas 'PointedEars' Lahn <PointedE...@we b.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 bugRiddenCrashP ronePieceOfJunk = (
* * navigator.userA gent.indexOf('M SIE 5') != -1
* * && navigator.userA gent.indexOf('M ac') != -1
) *// Plone, register_functi on.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
5762
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 difficult to know what is going on. One of these Order Forms you can see here... http://www.cardman.co.uk/orderform.php3
3
5981
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 the value of that session cookie in response to a button click in a form, without resubmitting the page. For some reason, the following doesn't seem to work:
6
3495
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 see the content. We call it FileBrowser (oh so clever) The purpose of this control is to display security bulletins, tutorials, user manuals on a corporate Intranet. So far so good.
3
1723
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 (the source control software we are using) and placed it into the IIS Web Root. After building and attempting to run the Solution, I am having problems with included Javascript files. How it is set up is that we have some .js files that have...
2
2422
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 namespace "EmbeddedResources" My resources are not included when the content is rendered in the browser. I have marked my JavaScript resource as Embedded. I am able to retrieve the path to the resource from the WebResource.axd HTTP Handler during...
0
9793
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10774
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10525
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9314
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7746
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6950
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5617
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4411
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3959
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.