09 - Form 'If' statement and evaluation

Possibly the most challenging aspect of the brief was to have the form page required to contain an email text field, which searches for an '@' in the text entered by the user (when submit is pressed).


The code above is the code I have provided to do the required job. In pseudo code it's saying. 

The function Emailcheck(cur) is:

If string1(the variable which stores the value of the email input) is searched (indexOf) and the result is -1 (doesn't contain an @ symbol), then bring up a popup alert

Evaluation
In retrospect, I am happy with the design and functionality of my website. I feel that it's easy to use, and whereas it isn't the most fancy in terms of design, it offers a simplicity that is visually appealing, with extra elements that have been added in good taste.

I have also learnt some valuable lessons - in terms of good coding practise that I will build upon, and almost certainly put to good use in my future of web development.

No comments:

Post a Comment