autor: prefiks » 23 kwietnia 2004, 19:38
Przeglądarka: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040415 Firefox/0.8
Nie sprawdzane, więc może nie pomóc, być może jeszcze coś jest do poprawki.
Wyciąć ze żródla, usunąć <br/> i przepuścić przez patch-a
--- orig.js 2004-04-23 20:32:51.000000000 +0200
+++ mod.js 2004-04-23 20:35:52.000000000 +0200
@@ -34,7 +34,7 @@
{
//emb.play();
- var dd = document.all[id];
+ var dd = document.getElementById(id);
//alert("sound ="+dd);
try{
dd.play();
@@ -713,7 +713,7 @@
else if (test_mode==1)
{
content += '<tr><td colspan="2" align="center">';
- content += '<input id = "sranje17" type="text" value="" onKeyDown="edit_event_down(this)" onKeyUp="edit_event(this)" onKeyPress="edit_event(this)" onchange="edit_event(this)" style="width:350;align:center;font-family: Tahoma, Verdana, Arial, Helvetica;font-size: 17px;background-color: #FFFFFF;border-top: 0px none;border-right: 0px none;border-bottom: 1px solid #999999;border-left: 0px none;text-align: center;font-weight: bold">';
+ content += '<input id = "sranje17" type="text" value="" onKeyDown="edit_event_down(this,event)" onKeyUp="edit_event(this,event)" onKeyPress="edit_event(this,event)" onchange="edit_event(this,event)" style="width:350;align:center;font-family: Tahoma, Verdana, Arial, Helvetica;font-size: 17px;background-color: #FFFFFF;border-top: 0px none;border-right: 0px none;border-bottom: 1px solid #999999;border-left: 0px none;text-align: center;font-weight: bold">';
content += '</td></tr>';
}
else if (test_mode==0)
@@ -794,9 +794,9 @@
}
function make_focus(id)
{
- if (document.all[id]!=null)
+ if (document.getElementById(id)!=null)
{
- document.all[id].focus();
+ document.getElementById(id).focus();
}
}
function ask(index) //index = test_mix[no][?] , ? = 0,1,2
@@ -885,21 +885,21 @@
}
}
- function edit_event_down(Input)
+ function edit_event_down(Input,event)
{
/* var te = Input.value;
if (direction == 1){ te = to_esperanto(te);}
te = replace_all(' ',' ',te); //make esperanto and remove double spaces
if (te!=Input.value) {Input.value=te;}
*/
- edit_event(Input);
+ edit_event(Input,event);
if (event.keyCode==13 || event.keyCode==10)
{
event.keyCode=0;
ask_input(Input.value);
}
}
- function edit_event(Input)
+ function edit_event(Input,event)
{
var te = Input.value;
if (direction == 1){ te = to_esperanto(te);}