I have looked at many of files in lib/python/app and a other folders in the zope installation. I am looking for a way to change the interface a little. I see some recognizable stuff there, but can't figure out how most of the pages are created, how I could change them. I want to add a frame to the edit page so I can submit while editing without refreshing the page. I would have to put a frame and javascript function I wrote, and include below because it is very useful.
This makes editing long docs in a textarea tolerable. I use it on a site with a lower frame where the user can see their changes and not lose their place as they edit/save.
function bgSubmit(frm)
frmHide = parent.frames["hidden"].document
var nd="<form name='" + frm.name + "' action='" + frm.action + "' method='" + frm.method + "'>"
for (i=0;i<document.forms[frm.name].elements.length;++i)
  if (elem.type=="select-one" || elem.type=="select-multiple")
    nd+="<select name='" + elem.name + "'"
    if (elem.type=="select-multiple") {nd+=" multiple "}
    for (x=0;x<elem.options.length;++x)
     nd+="<option "
     if (elem.options[x].selected) {nd+="selected "}
     nd+="value='" + elem.options[x].value + "'>" + elem.options[x].text + "</option>"
    }else if (elem.type=="textarea"){
    nd +="<textarea name='" + elem.name + "'>" + elem.value + "</textarea>"
   } else {
    nd +="<input type='" + elem.type + "' name='" + elem.name + "' value='" + elem.value + "'"
     if (elem.checked) {nd+=" checked "}
frmHide.write( nd );
//this function assume you have a frame named "hidden" and takes a form object as arg, e.g., bgSubmit (window.document.frmToSave)

Reply via email to