- Total Members: 220,001
- Threads: 525,379
- Posts: 976,967
-
September 22nd, 2012, 03:51 AM
#1
How to extract img src from an external list
Greetings
I need your help please..
I have a website of 20 pages. Each page displays an image from a catalog located in another domain, and the catalog changes each week, so I have to change the img src attribute each week too (the jpg images are named differently each week, though in the same directory). So instead of editing 20 html pages each time, I'm trying to find a way to control the img src from a text file, so that I edit only that text file once a week.
Is there a way to extract img src attributes from a text file or js file please?
For example I need page 1 to extract the first img src listed in the text file, and page 2 to extract the second src listed, etc.
I'm new to js so please give an example of the code that I should use.
Many thanks.
-
September 22nd, 2012, 01:22 PM
#2
Hi,
welcomes you 
there will be two option which will make your work easy.
1. assign one unique id on each image src , base on that retrieve the src form database base on page and image id (unique on entire application)
2. keep all src on xml file read the xml file when your page get load and again base on id retrieve the image src.
hope it will help you .
-
December 26th, 2012, 05:36 AM
#3
It is easy to extract img src from an external file after giving some unique id to every single image.
Similar Threads
-
By antonyx in forum HTML, JavaScript And CSS Help
Replies: 1
Last Post: March 21st, 2007, 12:58 PM
-
By ImSir2U in forum ASP Development
Replies: 9
Last Post: November 8th, 2005, 06:42 PM
-
By grayday in forum Microsoft Access Help
Replies: 3
Last Post: July 13th, 2004, 05:33 PM
-
By Steve Schofield in forum ASP Development
Replies: 1
Last Post: January 19th, 2001, 10:21 AM