[thelist] changing link text on-the-fly with JavaScript

Sarah Sweeney ssweeney at w3internet.com
Fri Mar 7 09:24:01 CST 2003

I have a page with a rather complicated form. Part of this form can be
"saved" (really it will just be  hidden, using the CSS "display: none;")
separately from the rest. What I'd like is for the value of the text box
and file upload field in this part of the form to be used to change a link.
So if the link is like this at first...
   <a href="somefile.doc">original text</a>
...then the user enters "new text" into the text box, selects a file in the
file upload field, and "saves" that section of the form, the link should say...
   <a href="newfile.doc">new text</a>
(Well, I guess the link would probably have to point to their local file at
this point...)

If anyone knows how to do this using JavaScript (client-side), I'd really
appreciate some hints to point me in the right direction. Otherwise I guess
I can do this server-side - it would just be nice to be able to do it with



More information about the thelist mailing list