SunQuest
           Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old February 1st, 2008, 04:26 PM
daniish daniish is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 3 daniish User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 26 sec
Reputation Power: 0
Javascript - Displaying all pictures from a folder

Hello there,

I have cobbled together the following site using the Google Maps API and would like to know how i can return all my photos from a folder with the same name as a marker id, when i click on a particular marker of my choice?

www globexposure net/index_basic.php

for example,

onclick marker where id=31
all photos from /travel_pics/31/ would be returned

...not sure if this could be called from my JS or if i had to do it server-side with my PHP...

Thank you for your time and attention

Reply With Quote
  #2  
Old March 30th, 2008, 04:02 PM
student101 student101 is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Nov 2007
Posts: 105 student101 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 57 m 41 sec
Reputation Power: 1
Smile

I can do it with PHP and ASP, no idea with JS, Java or Javascript (even though I would use javascript to call it)

Hey ask me, I have no clue what I do most of the time.
__________________
[DWMX 2004]|[DWMX 8]|[DW CS3]|[MySQL]|[SQL]|[Access ]|[ASP/VBScript]|[PHP]|[XP-Pro]
Global fix: "Invalid Default Script Language"

Last edited by student101 : March 30th, 2008 at 04:09 PM.

Reply With Quote
  #3  
Old March 30th, 2008, 04:06 PM
student101 student101 is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Nov 2007
Posts: 105 student101 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 57 m 41 sec
Reputation Power: 1
Thumbs up

Here is a script that can get the images from any folder:
Call it getpics.php
PHP Code:
<?php
function returnimages($dirname="uploads"//folder part remember to change
{
$pattern="\.(jpg|jpeg|png|gif|bmp)$";
$files = array();
$i 0;
if(
$handle opendir($dirname)) {
while(
false !== ($file readdir($handle))){
if(
eregi($pattern$file)){
}
}

closedir($handle);
}
return(
$files);
}
returnimages();
?>

Next page, the page that shows the images
Let's call it showpics.php
PHP Code:
//Here you set your choice of file type
<script type="text/javascript" src="getpics.php"></script> 


Pretty simple stuff, google answers questions, amazing stuff!

Cheers

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Javascript - Displaying all pictures from a folder


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway