![]() |
|
|
|
#1 |
|
Forgive me if this sounds trivial, but I hack a lot, but I think
I would best be described as a "hack of all languages". What that means is I know just enough to be dangerous in the computer languages I mess with. Anyway........... I have a little applet I found online somewhere and it has to do with displaying images. Now, the path to the selected images is lengthy, so I've been looking around in what I have for info on variable use and surprising to me I can't get any useful info where I've looked. So, I thought I'd come here What I want is a way to something like the following Tcl code: set myPath "to/he/ong/path/to/my/photos" set image01 "$myPath/image01.jpg" and to follow with a lengthy list of imageXX.jpg's instead of having to put in the long path in each line. Not a major deal, but if it can be done, email me at my address 'cause I don't monitor newsgroups all the time. Thanks for all help ........... ALF Allen Flick |
|
|
|
|
#2 |
|
Posts: n/a
|
On Wed, 07 Jan 2004 22:14:56 GMT, Allen Flick declared in alt.html:
> > What I want is a way to something like the following Tcl code: > > set myPath "to/he/ong/path/to/my/photos" > set image01 "$myPath/image01.jpg" > > and to follow with a lengthy list of imageXX.jpg's instead of having > to put in the long path in each line. HTML is a markup language, not a programming language. It cannot do any calculations, does not have variables, etc. You would need some sort of server-side language (the above looks similar to PHP), or possibly a pre-processor. > > Not a major deal, but if it can be done, email me at my address > 'cause I don't monitor newsgroups all the time. Sorry, ask here, get answers here. Why you shouldn't ask for E-mail responses on Usenet: http://www.cs.tut.fi/%7Ejkorpela/usenet/mail-responses -- Mark Parnell http://www.clarkecomputers.com.au |
|
|
|
#3 |
|
Posts: n/a
|
"Allen Flick" <> wrote in message news:... > Forgive me if this sounds trivial, but I hack a lot, but I think > I would best be described as a "hack of all languages". What > that means is I know just enough to be dangerous in the > computer languages I mess with. > > Anyway........... I have a little applet I found online somewhere > and it has to do with displaying images. Now, the path to the > selected images is lengthy, so I've been looking around in what > I have for info on variable use and surprising to me I can't get > any useful info where I've looked. So, I thought I'd come here > > What I want is a way to something like the following Tcl code: > > set myPath "to/he/ong/path/to/my/photos" > set image01 "$myPath/image01.jpg" > > and to follow with a lengthy list of imageXX.jpg's instead of having > to put in the long path in each line. > > Not a major deal, but if it can be done, email me at my address > 'cause I don't monitor newsgroups all the time. > > Thanks for all help ........... ALF > > You would be better off incorporating PHP or ASP or something serverside. But, if you are hell-bent on using HTML only, you could use server side includes (SSI). I dont think you save much code though... <html> <body> <h1>SSI Test</h1> <!--#set var="dir" value="/~myhomedir/stuff/images/" --> <img src='<!--#echo var="dir" -->stuff.jpg'> </body> </html> |
|
|
|
#4 |
|
Posts: n/a
|
Mark Parnell wrote:
> Why you shouldn't ask for E-mail responses on Usenet: Might carry a little more weight if you weren't setting a reply-to header to your email address. |
|
|
|
#5 |
|
Posts: n/a
|
On Thu, 08 Jan 2004 00:05:53 GMT, Leif K-Brooks declared in alt.html:
> Mark Parnell wrote: >> Why you shouldn't ask for E-mail responses on Usenet: > > Might carry a little more weight if you weren't setting a reply-to > header to your email address. I hadn't particularly realised I was. Thanks. Better? -- Mark Parnell http://www.clarkecomputers.com.au |
|
|
|
#6 |
|
Posts: n/a
|
xyzzy wrote:
<snip> > You would be better off incorporating PHP or ASP or something serverside. > But, if you are hell-bent on using HTML only, you could use server side > includes (SSI). > I dont think you save much code though... > > <html> > <body> > <h1>SSI Test</h1> > <!--#set var="dir" value="/~myhomedir/stuff/images/" --> > <img src='<!--#echo var="dir" -->stuff.jpg'> > </body> > </html> > I don't know much about SSI, but...since when were they part of HTML? ~Cameron |
|
|
|
#7 |
|
Posts: n/a
|
On Thu, 08 Jan 2004 00:05:53 +0000, Leif K-Brooks wrote:
> Mark Parnell wrote: >> Why you shouldn't ask for E-mail responses on Usenet: > > Might carry a little more weight if you weren't setting a reply-to > header to your email address. Reply-To is not Followup-To, as I recall. -- Some say the Wired doesn't have political borders like the real world, but there are far too many nonsense-spouting anarchists or idiots who think that pranks are a revolution. |
|
|
|
#8 |
|
Posts: n/a
|
Allen Flick wrote:
> What I want is a way to something like the following Tcl code: > > set myPath "to/he/ong/path/to/my/photos" > set image01 "$myPath/image01.jpg" > > and to follow with a lengthy list of imageXX.jpg's instead of having > to put in the long path in each line. I think the closest solution in HTML would be the BASE element: http://www.w3.org/TR/html401/struct/...html#edef-BASE But if you want to use variables properly, then use a proper programming language (such as Perl, PHP, C++, TCL, whatever) to output your HTML. -- Toby A Inkster BSc (Hons) ARCS Contact Me - http://www.goddamn.co.uk/tobyink/?page=132 |
|