This is a discussion on "Repeat data entered in a text box... and maybe change it?" within the JavaScript Forum section. This forum, and the thread "Repeat data entered in a text box... and maybe change it? are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Repeat data entered in a text box... and maybe change it?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Hi everyone,
I have 3 upload boxes on my website for images (small, medium and large), lets call them box 1, box 2 and box 3. When I press a button next to each, I can find the image that I'd like to upload, and then it puts the path into the text box for me, so that I can change it if I want. To save A LOT of time (there are loads of images in the folders, so it takes ages to load the window), I would like the path that is in box 1, to be repeated in boxes 2 and 3. Now here's the more difficult part, that I'm not sure can even be done! The folders that the images are in are named s, m and l. If I choose the image in box 1 (from the folder s), when the path is repeated in the other boxes, is there anyway to automatically change the s, to m and l. If the second point can't be done then no worries, any help at all with the first would be greatly appreciated. Many thanks in advance |
|
|
|
||||
|
Re: Repeat data entered in a text box... and maybe change it?
This isn't really a possibility due to javascript not having access to files on a user's machine, this would pose quite a security risk.
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
|||
|
Re: Repeat data entered in a text box... and maybe change it?
Thanks for your reply, but I think I must have made it unclear.
The text boxes don't need to have any access to files, all I want it to do is to repeat the text that is entered into box 1, into boxes 2 and 3. I've seen scripts to do this before, but only when a checkbox is selected. I'd like to do it when the text is changed, and to repeat the value from 1 box, in to 2 others. Many thanks, Simon |
|
||||
|
Re: Repeat data entered in a text box... and maybe change it?
Okay, I get what you're saying but you are talking about <input type="file">'s right?
You click on browse or find and it opens a window to select a file then once selected the path to the file goes into the text box. Javascript can't change this value because if you could do that with javascript, then the file at that path can then be sent to the server so a malicious coder could ask for c:\passwords.txt and that file would be sent to the website without the user knowing. You can change the values of text boxes easily enough but not file inputs.
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Change descriptive Google Text | Jack Franklin | Search Engine Optimization (SEO) | 17 | Dec 24th, 2007 14:15 |
| change colour of text, on hover. | Jason3107 | Web Page Design | 28 | Sep 27th, 2007 23:10 |
| background-repeat: repeat y not working properly | AdRock | Web Page Design | 12 | Feb 25th, 2007 22:17 |
| change text underline colour help | Aaron1988 | Web Page Design | 6 | Aug 30th, 2006 19:18 |
| Returning results into a table with no repeat of data | lobster1983 | PHP Forum | 7 | Sep 24th, 2005 20:23 |