Click here to Skip to main content
15,884,237 members
Home / Discussions / Web Development
   

Web Development

 
QuestionNot able to export SSL certificate to another server Pin
Ankur.Bakliwal10-Feb-11 1:17
Ankur.Bakliwal10-Feb-11 1:17 
QuestionImage Menu Hover Pin
exotiick9-Feb-11 21:47
exotiick9-Feb-11 21:47 
AnswerRe: Image Menu Hover Pin
Sunasara Imdadhusen15-Feb-11 22:07
professionalSunasara Imdadhusen15-Feb-11 22:07 
AnswerRe: Image Menu Hover Pin
Dalek Dave28-Mar-11 6:11
professionalDalek Dave28-Mar-11 6:11 
Questionfile automatically deletes on server Pin
Danzy839-Feb-11 10:56
Danzy839-Feb-11 10:56 
AnswerRe: file automatically deletes on server Pin
Peter_in_27809-Feb-11 11:58
professionalPeter_in_27809-Feb-11 11:58 
AnswerRe: file automatically deletes on server Pin
Pravin Patil, Mumbai4-Mar-11 1:13
Pravin Patil, Mumbai4-Mar-11 1:13 
Questionvalidating input type file in a form (no responses in JavaScript Forum) Pin
Douglas Kirk5-Feb-11 16:22
Douglas Kirk5-Feb-11 16:22 
Sorry, not sure where to post this, when I was doing C# development, the forum seemed to cover everything where the website stuff seem to be quite subdivided.

Hello I am trying to validate a form that has many field on it.

input type="text" name="sSoftwareType"
input type="text" name="sSoftwareName"
input type="file" name="sFileName"


The form itself validates itself by

form enctype="multipart/form-data" name="Software" action="SoftwareUpdate.php" method="post" onSubmit="return Validate(this);


The JavaScript validation code is

function Validate(f)
{

	if (f.sSoftwareType.value == "")
	{
		f.sSoftwareType.focus();
		return false;
	}
	if (f.sSoftwareName.value == "")
	{
		f.sSoftwareName.focus();
		return false;
	}
	if (f.sFileName.value == "")
	{
		f.sFileName.focus();
		return false;
	}
}


All the input type text are validated fine, the problem is that the filename does not get validated, it is simply ignored.

All I want to do is verify that the file information was selected. ie the user did do a browse and click on a file that gets the data filled in on the form.

It would be nice to do other validation, but I would be happy if I could get help on this basic function.

Thank you in advance
AnswerRe: validating input type file in a form (no responses in JavaScript Forum) Pin
Shahriar Iqbal Chowdhury/Galib11-Feb-11 10:17
professionalShahriar Iqbal Chowdhury/Galib11-Feb-11 10:17 
QuestionOddness that I never noticed before Pin
Ray Cassick4-Feb-11 16:59
Ray Cassick4-Feb-11 16:59 
AnswerRe: Oddness that I never noticed before Pin
_Maxxx_7-Feb-11 18:15
professional_Maxxx_7-Feb-11 18:15 
AnswerRe: Oddness that I never noticed before Pin
Dalek Dave9-Feb-11 11:10
professionalDalek Dave9-Feb-11 11:10 
QuestionModal Popup and flash object Pin
Ali Al Omairi(Abu AlHassan)3-Feb-11 3:56
professionalAli Al Omairi(Abu AlHassan)3-Feb-11 3:56 
AnswerRe: Modal Popup and flash object Pin
Sunasara Imdadhusen3-Feb-11 23:09
professionalSunasara Imdadhusen3-Feb-11 23:09 
GeneralRe: Modal Popup and flash object Pin
Ali Al Omairi(Abu AlHassan)4-Feb-11 5:33
professionalAli Al Omairi(Abu AlHassan)4-Feb-11 5:33 
GeneralRe: Modal Popup and flash object Pin
Sunasara Imdadhusen23-Jun-11 0:00
professionalSunasara Imdadhusen23-Jun-11 0:00 
GeneralRe: Modal Popup and flash object Pin
Ali Al Omairi(Abu AlHassan)23-Jun-11 2:39
professionalAli Al Omairi(Abu AlHassan)23-Jun-11 2:39 
GeneralLogin Form Pin
mkotaska3-Feb-11 1:51
mkotaska3-Feb-11 1:51 
GeneralRe: Login Form Pin
Ray Cassick5-Feb-11 8:45
Ray Cassick5-Feb-11 8:45 
GeneralRe: Login Form Pin
Member 31566709-Feb-11 22:42
Member 31566709-Feb-11 22:42 
QuestionIndian ruppes symbol in Crystal report Pin
ppchandak3-Feb-11 1:11
ppchandak3-Feb-11 1:11 
AnswerRe: Indian rupees symbol in Crystal report Pin
thatraja17-Feb-11 15:38
professionalthatraja17-Feb-11 15:38 
QuestionPorting desktop tools to web Pin
Koder2-Feb-11 0:24
Koder2-Feb-11 0:24 
AnswerRe: Porting desktop tools to web Pin
Not Active2-Feb-11 3:53
mentorNot Active2-Feb-11 3:53 
AnswerRe: Porting desktop tools to web Pin
cjoki3-Feb-11 5:05
cjoki3-Feb-11 5:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.