PDA

View Full Version : Enctype Form error....


NinjaTurtle
01-10-2003, 08:10 AM
dear,

if i am using <Form name="form" method="post" enctype="multipart/form-data" action="Newitem.asp">

and now i want to refresh the page when user click a button "Refresh" but i get error when i use request.form....

whammy
01-11-2003, 12:33 AM
Hmm, not sure - but you should never, ever, ever name your form "form", that's why it's always "form1" in Visual Studio, etc. because "form" is a reserved word (at least in javascript, perhaps it's the case in ASP too? I wouldn't know because I avoid that kind of stuff like the plague!). Either way, it's a very bad practice.

Actually, in newer versions of HTML, such as XHTML, <form name=""> is deprecated, so you'd be better off using

<form id="form1">

if you want to get "ahead of the curve".

If that doesn't help, first of all get rid of the enctype, unless you're using it for some particular reason which you haven't told us about... then let us see an example or some code. :)

NinjaTurtle
01-11-2003, 01:44 AM
emmm... form s not reserve word in asp or Javascript.
and waht i face the problem is the refresh page, i cannot use Request.form.... bcos im using the FORM enctype="Multipart/form-data".... i want to upload a image and i need to pass some text box value when i click a submit button to refresh the page....