Javascript fix
http://wordpress.org/support/3/1827 git-svn-id: http://svn.automattic.com/wordpress/trunk@829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
df997de886
commit
bf0aac0d51
|
@ -78,65 +78,69 @@ setTimeout("redirect();", 600);
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
|
|
||||||
function profile(userID) {
|
function profile(userID) {
|
||||||
window.open ("profile.php?action=viewprofile&user="+userID, "Profile", "width=500, height=450, location=0, menubar=0, resizable=0, scrollbars=1, status=1, titlebar=0, toolbar=0, screenX=60, left=60, screenY=60, top=60");
|
window.open ("profile.php?action=viewprofile&user="+userID, "Profile", "width=500, height=450, location=0, menubar=0, resizable=0, scrollbars=1, status=1, titlebar=0, toolbar=0, screenX=60, left=60, screenY=60, top=60");
|
||||||
}
|
}
|
||||||
|
|
||||||
function launchupload() {
|
function launchupload() {
|
||||||
window.open ("upload.php", "wpupload", "width=380,height=360,location=0,menubar=0,resizable=1,scrollbars=yes,status=1,toolbar=0");
|
window.open ("upload.php", "wpupload", "width=380,height=360,location=0,menubar=0,resizable=1,scrollbars=yes,status=1,toolbar=0");
|
||||||
}
|
}
|
||||||
|
|
||||||
function helpWindow(url) {
|
function helpWindow(url) {
|
||||||
window.open(url, "Help", "width=640, height=450, location=0, menubar=0, resizable=0, scrollbars=1, status=1, titlebar=0, toolbar=0, screenX=60, left=60, screenY=60, top=60");
|
window.open(url, "Help", "width=640, height=450, location=0, menubar=0, resizable=0, scrollbars=1, status=1, titlebar=0, toolbar=0, screenX=60, left=60, screenY=60, top=60");
|
||||||
}
|
}
|
||||||
function GetElementsWithClassName(elementName, className) {
|
|
||||||
var allElements = document.getElementsByTagName(elementName);
|
|
||||||
var elemColl = new Array();
|
|
||||||
for (i = 0; i < allElements.length; i++) {
|
|
||||||
if (allElements[i].className == className) {
|
|
||||||
elemColl[elemColl.length] = allElements[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return elemColl;
|
|
||||||
}
|
|
||||||
|
|
||||||
function blurry() {
|
function GetElementsWithClassName(elementName, className) {
|
||||||
if (!document.getElementById) return;
|
var allElements = document.getElementsByTagName(elementName);
|
||||||
|
var elemColl = new Array();
|
||||||
|
for (i = 0; i < allElements.length; i++) {
|
||||||
|
if (allElements[i].className == className) {
|
||||||
|
elemColl[elemColl.length] = allElements[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return elemColl;
|
||||||
|
}
|
||||||
|
|
||||||
var aInputs = document.getElementsByTagName('input');
|
function blurry() {
|
||||||
|
if (!document.getElementById) return;
|
||||||
|
|
||||||
for (var i = 0; i < aInputs.length; i++) {
|
var aInputs = document.getElementsByTagName('input');
|
||||||
|
|
||||||
aInputs[i].onclick = function() {
|
for (var i = 0; i < aInputs.length; i++) {
|
||||||
var inputColl = GetElementsWithClassName('input','valinp');
|
aInputs[i].onclick = function() {
|
||||||
var rel = document.getElementById('rel');
|
var inputColl = GetElementsWithClassName('input','valinp');
|
||||||
var inputs = '';
|
var rel = document.getElementById('rel');
|
||||||
for (i = 0; i < inputColl.length; i++) {
|
var inputs = '';
|
||||||
if (inputColl[i].checked) {
|
for (i = 0; i < inputColl.length; i++) {
|
||||||
if (inputColl[i].value != '') inputs += inputColl[i].value + ' ';
|
if (inputColl[i].checked) {
|
||||||
}
|
if (inputColl[i].value != '') inputs += inputColl[i].value + ' ';
|
||||||
}
|
}
|
||||||
inputs = inputs.substr(0,inputs.length - 1);
|
}
|
||||||
rel.value = inputs;
|
inputs = inputs.substr(0,inputs.length - 1);
|
||||||
}
|
if (rel != null) {
|
||||||
|
rel.value = inputs;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
aInputs[i].onkeyup = function() {
|
aInputs[i].onkeyup = function() {
|
||||||
var inputColl = GetElementsWithClassName('input','valinp');
|
var inputColl = GetElementsWithClassName('input','valinp');
|
||||||
var rel = document.getElementById('rel');
|
var rel = document.getElementById('rel');
|
||||||
var inputs = '';
|
var inputs = '';
|
||||||
for (i = 0; i < inputColl.length; i++) {
|
for (i = 0; i < inputColl.length; i++) {
|
||||||
if (inputColl[i].checked) {
|
if (inputColl[i].checked) {
|
||||||
inputs += inputColl[i].value + ' ';
|
inputs += inputColl[i].value + ' ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
inputs = inputs.substr(0,inputs.length - 1);
|
inputs = inputs.substr(0,inputs.length - 1);
|
||||||
rel.value = inputs;
|
if (rel != null) {
|
||||||
}
|
rel.value = inputs;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window.onload = blurry;
|
window.onload = blurry;
|
||||||
//]]>
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
Loading…
Reference in New Issue