Javascript 101

T

tyv

Hi,

I'm a bit new to Javascript and I've encountered a technical roadblock
on a website that I'm working on:

I am working with javascript in an ASP file and I have a field box
that has two required fields: a username and a password. I am having
difficulty trying to make the third field (the email address)
required.

Is it possible for me to put multiple "if" statements in a function?
Or is it possible to put multiple functions in a script so that I can
get all three fields to be required? If so, are there any examples
that I can see?

Additionally, my ASP file refers to another JS file and (obviously)
some of the scripts in the ASP files are referred to in the JS file as
well. I'm not quite sure where my scripts should be going as I
haven't referred to separate js files in a script before.

Any suggestions you can offer is much appreciated.

TV
 
P

Peter Michaux

Hi,

I'm a bit new to Javascript and I've encountered a technical roadblock
on a website that I'm working on:

I am working with javascript in an ASP file and I have a field box
that has two required fields: a username and a password. I am having
difficulty trying to make the third field (the email address)
required.

Is it possible for me to put multiple "if" statements in a function?
Yes

Or is it possible to put multiple functions in a script so that I can
get all three fields to be required?
Yes

If so, are there any examples
that I can see?

Flanagan's book (link below) will show you many examples of using the
language.
Additionally, my ASP file refers to another JS file and (obviously)
some of the scripts in the ASP files are referred to in the JS file as
well. I'm not quite sure where my scripts should be going as I
haven't referred to separate js files in a script before.

Any suggestions you can offer is much appreciated.

I think a good first step is reading Flanagan's book. There is errata
so check the O'Reilly site.

<URL: http://www.jibbering.com/faq/#FAQ3_1>

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,145
Messages
2,570,825
Members
47,371
Latest member
Brkaa

Latest Threads

Top