What am I doing wrong?
<input type='text' name='keyword' id='keyword' size='16'>
<a href= "" onclick="window.open('http://scholar.google.com/scholar?q=document.getElementById('keyword')');">
it opens a new window with without q = keyword.
Declaring document.getElementById('keyword')doesn't automatically give you the value written in it. For that, you need to do document.getElementById('keyword').value.
What you probably want to do is this:
<a onclick="window.open('http://scholar.google.com/scholar?q=' + document.getElementById('keyword').value);">Click here</a>