RB sub to change contents of an already-closed div. If you want to only change one part of the page, this would do the trick.
- BASICwebmaster BASICwebmaster Oct 8, 2007

'set the text of a div
sub setDivText divID$, text$
html "<script>
var div = document.getElementById('"+divID$+"');
div.innerHTML = '"+text$+"'
</script>"
end sub

Demonstration

div myLogin
  print "Username: "; : textbox #u, "" : print
  print "Password: "; : passwordbox #p, "" : print
  link #l, "Log In", tryLogin
end div
wait
 
sub tryLogin h$
  if (#u contents$() = "foo") and (#p contents$() = "bar") then
    call setDivText "myLogin", "Login Sucessful!"
  end if
end sub