473,498 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HELP : Dynamically load a particular script file when required...

Hi all,

I have several folders of images. Inside each folder is a JS file defining
an array of the images with a description of each image.

When a user selects a 'gallery'/folder on my site, I want to be able to load
in this JS file and create the HTML page of the images and descriptions.
Before you say "use a database...", I can't due to the hosting company.
Also, I want to make this simple for the users to update.!
The other method I use at the minute is to have the HTML already created
with the GALLERY.JS definded in the <HEAD> and just call that with a script
to create the images, but that means each HTML page is the same except for
the JS definition - which is just a waste - I want to do this dynamically.!

example...

Gallery 1 page...
<html><head><title></title>
<link rel="stylesheet" type="text/css" href="../styles.css">
<script language="JavaScript" src="page1/gallery.js"></script>
</head>
...

Gallery 2 page...
<html><head><title></title>
<link rel="stylesheet" type="text/css" href="../styles.css">
<script language="JavaScript" src="page2/gallery.js"></script>
</head>
...

I can't find away to call the
<script language="JavaScript" src="xxxxx/gallery.js"></script>
line from within a script.


Jul 20 '05 #1
1 3255
Fantastic.! Thanks matey

Mike

"Mosley Jones III" <me@info.gov.mars> wrote in message
news:3f******@funnel.arach.net.au...

"Mike Blackett" <me@mikeREMOVETHISblackett.co.uk> wrote in message
news:bf**********@hercules.btinternet.com...
Hi all,

I have several folders of images. Inside each folder is a JS file

defining
an array of the images with a description of each image.

When a user selects a 'gallery'/folder on my site, I want to be able to

load
in this JS file and create the HTML page of the images and descriptions.
Before you say "use a database...", I can't due to the hosting company.
Also, I want to make this simple for the users to update.!
The other method I use at the minute is to have the HTML already created
with the GALLERY.JS definded in the <HEAD> and just call that with a

script
to create the images, but that means each HTML page is the same except for the JS definition - which is just a waste - I want to do this

dynamically.!

example...

Gallery 1 page...
<html><head><title></title>
<link rel="stylesheet" type="text/css" href="../styles.css">
<script language="JavaScript" src="page1/gallery.js"></script>
</head>
...

Somthing like this

http://mosley.arach.net.au/lib/script.htm

look at code

Gallery 2 page...
<html><head><title></title>
<link rel="stylesheet" type="text/css" href="../styles.css">
<script language="JavaScript" src="page2/gallery.js"></script>
</head>
...

I can't find away to call the
<script language="JavaScript" src="xxxxx/gallery.js"></script>
line from within a script.


Jul 20 '05 #2

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

Similar topics

8
5448
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
7
5036
by: cjl | last post by:
Hey all: I've searched the newsgroup, and googled, but I'm stuck. I want to be able to 'dynamically' add a .js file to a web page after the page has loaded, based on user interaction. For...
1
2405
by: Jeff Smith | last post by:
Can I load custom web user controls dynamically and access the properties and methods without having to explicitly define custom control types (example 2 below). I have custom web control named...
3
2220
by: Tim::.. | last post by:
Can someone please help.... I'm having major issues with a user control I'm tring to create! I an trying to execute a sub called UploadData() from a user control which I managed to do but for...
5
3710
by: Dennis Fazekas | last post by:
Greetings, I am creating a web form which will all the user to add an unlimited number of email addresses. Basically I have 3 buttons, "Add Another Email", "-" to remove, and a "Save" button....
0
2199
by: Jack Wu | last post by:
Hi I've spent a good majority of my day trying to figure out how to have PIL 1.1.5 working on my OSX 10.3.9_PPC machine. I'm still stuck and I have not gotten anywhere. Could somebody please...
0
5518
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
2
2078
by: hzgt9b | last post by:
I've written a simple javascript page that parses an XML file... (Actually I just modified the "Parsing an XML File" sample from http://www.w3schools.com/dom/dom_parser.asp) The page works great...
2
5086
by: Smithers | last post by:
I have a Windows Forms application that implements a plug-in architecture whereby required assemblies are identified and loaded dynamically. Here are the relevant classes: A = application =...
0
7168
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
7210
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...
0
7381
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5465
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,...
1
4916
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...
0
4595
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...
0
3096
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...
0
1424
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 ...
1
659
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.