Have first field focus on popup

git-svn-id: http://svn.automattic.com/wordpress/trunk@2751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2005-08-05 18:30:35 +00:00
parent 0f84eac781
commit a0cb418938
2 changed files with 5 additions and 0 deletions

View File

@ -30,6 +30,8 @@ if (url != null) {
} }
function init() { function init() {
// Focus form field
document.getElementById('src').focus();
var formObj = document.forms[0]; var formObj = document.forms[0];
for (var i=0; i<document.forms[0].align.options.length; i++) { for (var i=0; i<document.forms[0].align.options.length; i++) {
@ -99,6 +101,7 @@ if (url != null) {
tinyMCE.addEvent(preloadImg, "error", function () {var formObj = document.forms[0];formObj.width.value = formObj.height.value = "";}); tinyMCE.addEvent(preloadImg, "error", function () {var formObj = document.forms[0];formObj.width.value = formObj.height.value = "";});
preloadImg.src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], document.forms[0].src.value); preloadImg.src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], document.forms[0].src.value);
} }
</script> </script>
</head> </head>
<body onload="init();"> <body onload="init();">

View File

@ -83,6 +83,8 @@ if (url != null) {
formObj.link_list.options[i].selected = true; formObj.link_list.options[i].selected = true;
} }
} }
// Focus form field
document.getElementById('href').focus();
} }
function insertLink() { function insertLink() {