Question: I have a form that will submit to a Google search appliance, forming a query string "q".

In the form I have radio buttons and a hidden element; the radio buttons contain options for sites to select; the hidden element contains multiple sites that will allow the user to select multiple site searches.

```
<input type="radio" id="site_search" name="as_sitesearch" value="www.mycompany.com" checked>Current site<br />
<input type="radio" id="site_search" name="as_sitesearch" value="archive.mycompany.com">Archive site<br />
<input type="radio" id="site_search" name="as_sitesearch" value="">Both sites<br />
<input type="hidden" id="as_oqOption" name="as_oq" value="www.mycompany.com archive.mycompany.com">

```

This is the Javascript I wrote that will remove the radio element or the hidden element exclusively (one of them can exist in the form submittal):

```
// IF THE USER CHECKED "BOTH SITES", YOU WILL HAVE TO WIPE OUT THE VALUE OF as_sitesearch TO ALLOW FOR PASSING OF as_oq FOR GOOGLE ENGINE
if (form.elements['as_sitesearch'][0].value.length == 0) {
        var goodbyeElement = document.getElementById('site_search');
        goodbyeElement.parentNode.removeChild(goodbyeElement);
} else {
        var goodbyeElement = document.getElementById('as_oqOption');
        goodbyeElement.parentNode.removeChild(goodbyeElement);
}

```

However, when the form is submitted, "q" winds up obtaining both radio and hidden elements no matter what radio option I click. 

Not sure why this is happening as I followed the guides in the DOM tutorial sites I have read on how to remove a form element prior to submittal. Any ideas?

Thanks

Answer: 
I got your question, you are trying to create a database as explained in book by elamsari.

Try to add a constraint " FOREIGN KEY (superssn) REFERENCES company.employee(ssn); "
before adding the data, since adding this constraint won't affect the adding data into table.

However, add the constraint related to dno using ALTER table command Later after adding the data.
Then you won't get error 1452:

I tried this, it works
Cheers
While entering the value of data as null
always use NULL without quotes NOT like "NULL"

this is why you are getting an error because instead of CHAR(9) you are entering a string of char(4)

So use NULL instead of "NULL"