having trouble with document object
I am dont use javascript that much, I jsut do a few things here and there - but I am not sure if I am allowed to do this....I am creating numerous dynamically generated forms...each form has a button that on the onclick event data is check(verified) and then that form is sent in order to know which form it is that has to be sent I need to send the form name in a variable to the javascript function....but I am running into problems....if I try to do this
<script language="javascript">
function send()
{
var x="updateform1";
document.x.submit()
}
</script>
I get an error document.x is not an object...
but if I did
document.updateform1.submit()
it works fine - how do I subsitute a variable in the document object???
thanks Adina
|