do script in Internet Explorer

I’m trying to run the do script event in Internet Explorer, so I can get a form element from a frame returned to an applescript. Any ideas where I can get information on browser scripting? Microsoft seems lax in this…
I’ve tried this (and many variations…):

set getGroupNo to "return top.grouppane.forms[0].group_no.value;"
tell application "Internet Explorer 4.5"
set groupNumber to {do script 12, getGroupNo}
display dialog groupNumber as text
end tell

Sorry, I think my Javascript was bad. I put a function on the page containing the frames, and had the do script call that function, and it seems to work.
(in my Applescript)

on run
set getGroupNumber to "getGroupNo()"
tell application "Internet Explorer 4.5"
set group_number to do script getGroupNumber as text
display dialog group_number
// or do my other processes...
end tell
end run
(... and on the web page...)
function getGroupNumber() {
group_no =[0].group_no.value;
return group_no;