The code you have mocked up looks fine to me, except you should probably have option1 and option2 instead of reusing the variable. Though it may work just fine the way it is.
Actually my Smarty is leaking through in my example. Instead of "or" you should use "||".
You should name the variables something that makes sense to you, so you can understand the code when you look at it later.
It is also a good idea to check if the variable exists before running any other operations.
Consider this:
Code:
var date = $('#po9').val();
if(date == '' || date == null) {
alert("Please enter the date that the highlight video was taken! ");
return false;
}
var name = $('#po8').val();
if(name == '' || name == null) {
alert("Please enter the name of the client in the highlight video! ");
return false;
}
I am not testing this script, just making the example. The way to see if it works is by trial and error, that is also how you learn. To troubleshoot any script you need to break it down into it's smallest pieces. For instance, at first you can just declare the variable, then alert its contents. Rather than trying to complete your script in its entirety right from the start. If you can start seeing the alert box pop up, then you know you are on the right track.