Google Groups Home
Help | Sign in
Javascript Read Content Directory
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Hannes  
View profile
 More options May 14, 2:14 pm
Newsgroups: comp.lang.javascript
From: Hannes <derveauxhan...@gmail.com>
Date: Wed, 14 May 2008 11:14:05 -0700 (PDT)
Local: Wed, May 14 2008 2:14 pm
Subject: 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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas 'PointedEars' Lahn  
View profile
 More options May 14, 3:04 pm
Newsgroups: comp.lang.javascript
From: Thomas 'PointedEars' Lahn <PointedE...@web.de>
Date: Wed, 14 May 2008 21:04:48 +0200
Local: Wed, May 14 2008 3:04 pm
Subject: Re: Javascript Read Content Directory

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:fe1a9723-d180-4053-9651-c677a34c6ba3@l42g2000hsc.googlegroups.com>
[2] <news:482AD1AF.7080402@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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hannes  
View profile
 More options May 14, 4:53 pm
Newsgroups: comp.lang.javascript
From: Hannes <derveauxhan...@gmail.com>
Date: Wed, 14 May 2008 13:53:15 -0700 (PDT)
Local: Wed, May 14 2008 4:53 pm
Subject: Re: Javascript Read Content Directory
On 14 mei, 21:04, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:

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.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas 'PointedEars' Lahn  
View profile
 More options May 14, 5:09 pm
Newsgroups: comp.lang.javascript
From: Thomas 'PointedEars' Lahn <PointedE...@web.de>
Date: Wed, 14 May 2008 23:09:33 +0200
Local: Wed, May 14 2008 5:09 pm
Subject: Re: Javascript Read Content Directory
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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hannes  
View profile
 More options May 17, 6:07 am
Newsgroups: comp.lang.javascript
From: Hannes <derveauxhan...@gmail.com>
Date: Sat, 17 May 2008 03:07:03 -0700 (PDT)
Local: Sat, May 17 2008 6:07 am
Subject: Re: Javascript Read Content Directory
On 14 mei, 23:09, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:

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.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas 'PointedEars' Lahn  
View profile
 More options May 17, 12:23 pm
Newsgroups: comp.lang.javascript
From: Thomas 'PointedEars' Lahn <PointedE...@web.de>
Date: Sat, 17 May 2008 18:23:05 +0200
Local: Sat, May 17 2008 12:23 pm
Subject: Re: Javascript Read Content Directory

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>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google