--- loncom/interface/loncommon.pm 2002/06/25 17:09:38 1.41 +++ loncom/interface/loncommon.pm 2002/07/01 15:24:44 1.42 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.41 2002/06/25 17:09:38 ng Exp $ +# $Id: loncommon.pm,v 1.42 2002/07/01 15:24:44 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -190,6 +190,92 @@ BEGIN { } # ============================================================= END BEGIN BLOCK +############################################################### +## HTML and Javascript Helper Functions ## +############################################################### + +=pod + +=item browser_and_searcher_javascript + +Returns scalar containing javascript to open a browser window +or a searcher window. Also creates + +=over 4 + +=item openbrowser(formname,elementname,only,omit) [javascript] + +inputs: formname, elementname, only, omit + +formname and elementname indicate the name of the html form and name of +the element that the results of the browsing selection are to be placed in. + +Specifying 'only' will restrict the browser to displaying only files +with the given extension. Can be a comma seperated list. + +Specifying 'omit' will restrict the browser to NOT displaying files +with the given extension. Can be a comma seperated list. + +=item opensearcher(formname, elementname) [javascript] + +Inputs: formname, elementname + +formname and elementname specify the name of the html form and the name +of the element the selection from the search results will be placed in. + +=back + +=cut + +############################################################### +sub browser_and_searcher_javascript { + return <