PageRenderTime 58ms CodeModel.GetById 32ms RepoModel.GetById 1ms app.codeStats 0ms

/plugins/jojo_core/external/frajax/frajax.js

http://jojocms.googlecode.com/
JavaScript | 23 lines | 23 code | 0 blank | 0 comment | 15 complexity | a0d02965e39d5b3ec5b8ca8ed3b4b4a5 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-3-Clause, LGPL-2.0, CC-BY-SA-3.0, MIT
  1. function frajax(action,a,b,c,d,e,f,g,h,i,j) {
  2. var url = siteurl;
  3. var r = /(http|https):\/\/.*/;
  4. var m = r.exec(window.location);
  5. if (m != null && m.length > 1) {
  6. if (m[1] == 'https') {
  7. url = secureurl;
  8. }
  9. }
  10. url += '/actions/' + action + '.php?';
  11. if (a) {url += 'arg1=' + encodeURIComponent(a);}
  12. if (b) {url += '&arg2=' + encodeURIComponent(b);}
  13. if (c) {url += '&arg3=' + encodeURIComponent(c);}
  14. if (d) {url += '&arg4=' + encodeURIComponent(d);}
  15. if (e) {url += '&arg5=' + encodeURIComponent(e);}
  16. if (f) {url += '&arg6=' + encodeURIComponent(f);}
  17. if (g) {url += '&arg7=' + encodeURIComponent(g);}
  18. if (h) {url += '&arg8=' + encodeURIComponent(h);}
  19. if (i) {url += '&arg9=' + encodeURIComponent(i);}
  20. if (j) {url += '&arg10=' + encodeURIComponent(j);}
  21. document.getElementById('frajax-iframe').src = url;
  22. return false;
  23. }