diff options
Diffstat (limited to 'release/scripts/io/netrender/netrender.js')
-rw-r--r-- | release/scripts/io/netrender/netrender.js | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/release/scripts/io/netrender/netrender.js b/release/scripts/io/netrender/netrender.js new file mode 100644 index 00000000000..23f9f25c763 --- /dev/null +++ b/release/scripts/io/netrender/netrender.js @@ -0,0 +1,43 @@ +function request(url, data) +{ + xmlhttp = new XMLHttpRequest(); + xmlhttp.open("POST", url, false); + xmlhttp.send(data); + window.location.reload() +} + +function edit(id, info) +{ + request("/edit_" + id, info) +} + +function returnObjById( id ) +{ + if (document.getElementById) + var returnVar = document.getElementById(id); + else if (document.all) + var returnVar = document.all[id]; + else if (document.layers) + var returnVar = document.layers[id]; + return returnVar; +} + +function toggleDisplay( className, value1, value2 ) +{ + style = getStyle(className) + + if (style.style["display"] == value1) { + style.style["display"] = value2; + } else { + style.style["display"] = value1; + } +} + +function getStyle(className) { + var classes = document.styleSheets[0].rules || document.styleSheets[0].cssRules + for(var x=0;x<classes.length;x++) { + if(classes[x].selectorText==className) { + return classes[x]; + } + } +}
\ No newline at end of file |