Double DB insert using body.onload
I created a variant of the "XMLHttp Examples" in Chapter 2 to execute the oXmlHttp get request from body.onload and return the record id. It works perfectly with a user initiated link but when using the body.onload, it inserts 2 records instead of 1. Is there another way to have the page automatically call the function which would prevent 2 records from being inserted?
thanks.
|