DTP


 
Lively discussions on the graphic arts and publishing — in print or on the web


Go Back   Desktop Publishing Forum > General Discussions > Web Site Building & Maintenance

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 03-30-2007, 04:50 AM   #1
jwoolf09
Member
 
Join Date: Oct 2005
Location: Manchester, NH
Posts: 65
Default Modify a page based on a file extension?

I seem to have a knack for needing answers to complicated questions... :-)

Situation: I have a program that's producing a series of webpages based on a template. At the moment, the template produces a pretty basic page with four components: a header bar with title info, a photo on the left, a block of text on the right, and a footer bar below.

I want to enhance this template so that it can show playable videos in the "photo" block as well as the jpgs that it's already storing. But I need the same template to work for both kinds of files. The only quick way I can think of to do that is to have some sort of embedded script function which is interpreted at runtime to change the link type within the generated page. Is there a way in Javascript to detect the file type of a file referred to in an img tag, then change the content of the tag from fixed image to playable video?

I'm guessing the answer is "no," because a jpg takes an <img> tag and a video requires an <a href> tag. But I thought I would ask, just to be sure.


-- Jon W.
jwoolf09 is offline   Reply With Quote
 

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
VEF extension Deg Fonts & Typography 6 08-10-2006 01:38 PM
New web-based library catalogue uses frames! annc Web Site Building & Maintenance 50 07-17-2006 12:44 PM
SEO extension for Firefox Kelvyn Web Site Building & Maintenance 6 07-10-2006 03:21 PM
Topic Based design dacoyle Web Site Building & Maintenance 10 12-01-2005 07:25 PM
What's that extension? Bo Aakerstrom General Publishing Topics 8 09-15-2005 12:24 AM


All times are GMT -8. The time now is 06:19 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Contents copyright 2004–2014 Desktop Publishing Forum and its members.