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

Kae Verens kverens at contactjuggling.org
Fri Mar 7 09:34:01 CST 2003


Sarah Sweeney wrote:
> 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...)

from what I understand about what you want, I'm not certain it's
possible, for security reasons.

file upload boxes are generally a don't-touch area for JavaScript
because if it was possible to manipulate them, then a sneaky webmaster
could grab a copy of your files without you knowing.

I think you have a tricky time ahead of you if you require this to be
done in teh backend.

--
Kae  Verens +----------------------------------+ webworks.ie
        pay  |      http://www.webworks.ie      |  bee
    play     |  http://www.contactjuggling.org  |     boss
kae         |http://kverens.contactjuggling.org|         god




More information about the thelist mailing list