Thanks, Massimo.
Here's the deal: I'm making a photo gallery for my brother.
He has
hundreds, nay thousands, of images taken all over the world
(as a
professional wildlife photographer). He gives me the images
with names as I
indicated earlier (words and keywords separated by hyphens).
I am using an app that can display the alt attribute's value
as a photo
caption. This would be why I am asking these goofy questions
- to
automatically transfer the filename to the alt attribute, and
to strip out
the hyphens. But I think a stake has been driven through this
one's heart
by the comment that dynamically written content like that is
not 'on the
page'. So - I'm back to the drawing board.
What's that you say? Why don't I use a database? That would,
of course, be
the obvious solution. But his data is not in a form that
lends itself to
that approach at this moment! 8(
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Massimo Foti" <massimo@massimocorner.com> wrote in
message
news:e23lb2$b7r$1@forums.macromedia.com...
> "Murray *ACE*" <forums@HAHAgreat-web-sights.com>
wrote in message
> news:e23kjr$adb$1@forums.macromedia.com...
>> Thanks bud! What I really need, though, is something
that will do this
>> when the page loads, not inside of DW. And I need it
to strip the dashes
>> when it does.
>
> I see! try this out:
>
> <script type="text/javascript">
> function loadAlt(){
> var imgNodes = document.getElementsByTagName("img");
> for(var i=0; i<imgNodes.length; i++){
> var cleanedSrc = imgNodes
.src.replace("-", "");
> imgNodes.setAttribute("alt", cleanedSrc);
> }
> }
> </script>
> </head>
> <body onload="loadAlt()">
>
> Hope it will help, it's late here and I am ready to go
to bed :-)
>
> Massimo
>