diff options
author | makkalot <makkalot@gmail.com> | 2008-07-12 00:01:22 +0300 |
---|---|---|
committer | makkalot <makkalot@gmail.com> | 2008-07-12 00:01:22 +0300 |
commit | 7face95cc613e92faa40b2c7f8cacf3b4a2bfd55 (patch) | |
tree | e177212d43e5b262e5bdfaeaddec0b8df241beb7 /funcweb | |
parent | 78233c01a607a7b8f219ce30e88ab15769e8f8c2 (diff) | |
download | func-7face95cc613e92faa40b2c7f8cacf3b4a2bfd55.tar.gz func-7face95cc613e92faa40b2c7f8cacf3b4a2bfd55.tar.xz func-7face95cc613e92faa40b2c7f8cacf3b4a2bfd55.zip |
need that dom manipulation for post ajax requests to update result div if it is not there
Diffstat (limited to 'funcweb')
-rw-r--r-- | funcweb/funcweb/static/javascript/ajax.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/funcweb/funcweb/static/javascript/ajax.js b/funcweb/funcweb/static/javascript/ajax.js index 7df4749..b54ed7a 100644 --- a/funcweb/funcweb/static/javascript/ajax.js +++ b/funcweb/funcweb/static/javascript/ajax.js @@ -1,3 +1,26 @@ +function addDomAjaxREsult(){ + + //just creates the sturctore that is in result.html + if (getElement('resultbox')==null){ + var result_header = DIV({'align':'center','class':'graytexts'}); + result_header.innerHTML = "Result"; + var minions = DIV({'class':'minions','id':'minions'},result_header); + var results = DIV({'class':'resultbox','id':'resultbox'}); + var main = DIV( + {'class':'resultbigbox','id':'resultbigbox'}, + minions, + results + ); + + //adding those to main part .. + var result_container=getElement("resultcontent"); + appendChildNodes(result_container,main); + } + else + getElement('resultbox').innerHTML = ""; +} + + function remoteFormRequest(form, target, options) { var query = Array(); var contents = formContents(form); |