html and javscript problem

hi I have this code but when i run it it gives me run time error where i have defined the Form . It says Object expected.
Will appreciate any help.

<script language="Javascript/text">
function checkForm(myForm)
var thisForm = myForm;
If (thisForm.selectBooks.value=="")


//error is here It says object expected?
<FORM name="AABooks" method="post" action="sell_Books.php;">
<SELECT name="selectBooks" onChange="checkForm(document.AABooks);" style="font-size='13px'; font-family='MS Sans Serif'; font-weight=500; font-style='Normal'; text-decoration='None'; width=">
<OPTION value="" SELECTED style="background-color='';color=''">Select
<OPTION value="">-----------------------------


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You have a number of faults in your code. The one causing "object expected" error is caused by using language="Javascript/text".

Either use
<script type="text/javascript">

<script language="javascript">

Here is something that works (use indentation to reveal problems in your javascript code):

<script type="text/Javascript">
function checkForm(mySelector) {
     if (mySelector.value=="") {
     } else {

<FORM name="AABooks" method="post" action="sell_Books.php">
<SELECT name="selectBooks" onChange="checkForm(this);" style="font-size='13px'; font-family='MS Sans Serif'; font-weight=500; font-style='Normal'; text-decoration='None'; width=''">
<OPTION value="" SELECTED style="background-color='';color=''">Select
<OPTION value="">-----------------------------
<OPTION value="something">Submit the form


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pls change this part



here is another problem - on this line:

<FORM name="AABooks" method="post" action="sell_Books.php;">

you should get rid of the semicolon after "sell_Books.php"
because you have the semicolon, the browser thinks sell_Books.php is javascript code
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

This question has been classified abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.

Unless it is clear to me that the question has been answered I will recommend delete.  It is possible that a Grade less than A will be given if no expert makes a case for an A grade. It is assumed that any participant not responding to this request is no longer interested in its final disposition.

If the user does not know how to close the question, the options are here:


Recommendation: Points to me. I have answered by pointing out the cause of the error AND providing an alternative.
It is time to clean this abandoned question up.

I am putting it on a clean up list for CS.

pointst to russellshome


If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.


It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.