Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Enctype question

Status
Not open for further replies.

Mighty

Programmer
Feb 22, 2001
1,682
US
Guys,

Is it possible to have a dynamic enctype on a form. Basically I want to set it based on a selection by the user. If the user changes the selected option in a listbox then I want to leave the enctype at the default value and just submit to the same page. However, if the user submits the page by pressing the submit button, I want to set the enctype to ENCTYPE="multipart/form-data" and then submit.

Any ideas how I can do this??? Mise Le Meas,

Mighty :)
 
I know exactly what you will tell me about this. Setting the value of a form element is element.value, the name : element.name but encType is not form.encType.

this should work :

document.myForm.encoding = "GET" // or whatever you want it to be.

Gary " Haran
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top