"kj"wrote
Is it possible to create a form on the fly, by creating the form
and its elements, and adding them to the document somehow?
Depending on the capabilities of the browser, yes. Those supporting advanced
DOM methods will understand this:
{
var d=document;
var f=d.createElement('form');
var i=d.createElement('input');
var i2=i.cloneNode(false);
var br=d.createElement('br');
f.action='
http://www.google.com/search';
f.method='get';
f.name='f';
i.type='text';
i.name='q';
i.value='';
i2.type='submit';
i2.value=' Search ';
f.appendChild(i);
f.appendChild(br);
f.appendChild(i2);
d.body.insertBefore(f,d.body.firstChild);
}
--Iv