Revision 4971
Added by daigle almost 15 years ago
ajax-utils.js | ||
---|---|---|
1 | 1 |
/* |
2 | 2 |
* '$RCSfile$' |
3 |
* Purpose: Default style sheet for KNP project web pages |
|
4 |
* Using this stylesheet rather than placing styles directly in |
|
5 |
* the KNP web documents allows us to globally change the |
|
6 |
* formatting styles of the entire site in one easy place. |
|
3 |
* Purpose: Basic Ajax utilities |
|
7 | 4 |
* Copyright: 2009 Regents of the University of California and the |
8 | 5 |
* National Center for Ecological Analysis and Synthesis |
9 |
* Authors: Matt Jones
|
|
6 |
* Authors: Michael Daigle
|
|
10 | 7 |
* |
11 | 8 |
* '$Author: daigle $' |
12 | 9 |
* '$Date: 2008-07-06 21:25:34 -0700 (Sun, 06 Jul 2008) $' |
... | ... | |
27 | 24 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
28 | 25 |
*/ |
29 | 26 |
|
27 |
/* submits a form via ajax and inserts the results into the given div |
|
28 |
* Params: |
|
29 |
* url - url to hit |
|
30 |
* formId - id of the form to submit |
|
31 |
* divId - the name of the div where the results should be put |
|
32 |
*/ |
|
30 | 33 |
function submitFormIntoDiv(url, formId, divId) { |
31 | 34 |
//alert('Sending form: ' + formId + " to url: " + url); |
32 | 35 |
var formObj = document.getElementById(formId); |
... | ... | |
37 | 40 |
}); |
38 | 41 |
} |
39 | 42 |
|
43 |
/* submits a url via ajax and inserts the results into the given div |
|
44 |
* Params: |
|
45 |
* url - url to hit |
|
46 |
* divId - the name of the div where the results should be put |
|
47 |
*/ |
|
40 | 48 |
function submitUrlIntoDiv(url, divId) { |
41 | 49 |
//alert('Sending url: ' + url); |
42 | 50 |
|
Also available in: Unified diff
Beef up comments