Is that a question? Seriously, what are you even asking... First, Java is to Javascript as Ham is to Hamburger. Two relatively unrelated items of which the only thing they have in common is being meat. Second, you don't say what 'function' you are trying to create... Third, good scripting should hook a form not be in it. Fourth, you aren't showing us what form you're trying to work with... Fifth, do you even HAVE a working form? Remember the unwritten rule of JavaScript, if you can't make a page work without JavaScript FIRST, you likely have no business adding JavaScript to it. ... unless of course, you ACTUALLY mean Java -- in which case you'd be pissing all over the page's usefulness and functionality.