From: <par...@us...> - 2010-02-09 18:07:54
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv24958/functions Modified Files: event.js Log Message: Fix jumpbox vs PHP transparent SID Index: event.js =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/event.js,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** event.js 7 Jul 2009 14:48:29 -0000 1.18 --- event.js 9 Feb 2010 18:07:46 -0000 1.19 *************** *** 50,51 **** --- 50,77 ---- //--> </script> + <script language="JavaScript" type="text/javascript"> + <!-- + + function submitform(form, value) { + // Parse value. + var values = decodeURI(value).split("&"); + var temp = values[0].split("?", 2); + var action = temp[0]; + values[0] = temp[1]; + + form.action = action; + + // Stuff the hidden form fields. + for (var i = 0; i < values.length; i++) { + temp = values[i].split("=", 2); + form.elements.namedItem(temp[0]).value = temp[1]; + } + + // Clear the select+option value. + var select = form.elements.namedItem("action") + select.options[select.selectedIndex].value = ""; + + form.submit(); + } + //--> + </script> |