473,396 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

File Upload Form text - is it posible to set READONLY by javascript

Hi All. One of the fields used in my form is to upload file, Is is to
posible to made this field readonly and after filling radio field set
this to use by javascript. I don't wanna give a User chance to upload
file until he check in the form that he want's to upload File.
thanks for any help
Gregor
Apr 26 '06 #1
1 1767
Grzegorz ?lusarek wrote:
Hi All. One of the fields used in my form is to upload file, Is is to
posible to made this field readonly and after filling radio field set
this to use by javascript. I don't wanna give a User chance to upload
file until he check in the form that he want's to upload File.
thanks for any help
Gregor


Hi,

You cannot do a lot of scripting against a file-upload formelement in
Javascript.
This is intentionally because if scripting was possible, you would be able
to add more files (for example: all kind of systemfiles), and create a
serious securityproblem.

I think the easiest solution for you is using CSS:
1) Place the fileuploadpart in a div that has display:none
2) Once the checkbox is checked, you change this to display=block.

Please note that people who have JS disabled will be left out with the
described solution, because they have no way of making the div visible
again.

Regards,
Erwin Moller
Apr 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Simon | last post by:
I would like to create a very basic file upload add image form to add to my web site and to keep them in a "tmp" directory within my web hosting file manager once uploaded. I understand the basic...
4
by: James | last post by:
I have a form with a bunch of data that's input (dropdowns, textboxes, etc.) and I have a link to a popup window which uses the persits control to upload a file. They work well independently. The...
2
by: DA | last post by:
Hello, I'm hoping someone can help me here. I've got a form that when placed on a server running HTTPS, I get an "access denied" error in IE 6 (non-SP2 and SP-2) when a user tries to upload an...
4
by: bjkstudio | last post by:
Hello I am trying to create a simple file upload form so my band members can upload mp3s onto my server. I am using this tutorial: http://www.tizag.com/phpT/fileupload.php I am having...
3
by: PSI_Orion | last post by:
I am writing a database which I edit locally using PHP / MySQL / JavaScript. What I currently do is to list all my DVD covers from a single folder into a drop box but what I would LIKE to do is to...
1
by: shilpa1205 | last post by:
I have written a page similar to file upload form.....which takes in a input from the browse and does soem functionality and displays the success message in next page. <html:file...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.