Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Java script nie działą pod FF, Bład z getElementById
Naster
post 21.05.2010, 07:04:29
Post #1





Grupa: Zarejestrowani
Postów: 30
Pomógł: 0
Dołączył: 2.08.2007

Ostrzeżenie: (0%)
-----


document.forms is not a function
http://www.mechofduty.webd.pl/elizabeth/js/train.js
Line 43

A oto co tam jest;
Kod
// wyswietla wartosci statystyk
function displayStat()
{
    document.getElementById('Exp').innerHTML = exp_now;
    for(var i = 0; i < 8; i++)
    {
      document.getElementById('cost['+i+']').innerHTML = getStatCost(addedStat[i] + baseStat[i] + 1);
      document.getElementById('staty['+i+']').innerHTML = addedStat[i] + baseStat[i];
      document.forms('train').elements('stat['+i+']').value = addedStat[i] + baseStat[i];
    }
    document.forms('train').elements('exp_now').value = exp_now;
    
}


Dodam że na Operze działa bez problemu.
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
athei
post 21.05.2010, 08:59:06
Post #2





Grupa: Zarejestrowani
Postów: 389
Pomógł: 141
Dołączył: 11.04.2009

Ostrzeżenie: (0%)
-----


Kod
js
document.forms['train']
html
<form id="train">
Go to the top of the page
+Quote Post
Naster
post 21.05.2010, 09:53:13
Post #3





Grupa: Zarejestrowani
Postów: 30
Pomógł: 0
Dołączył: 2.08.2007

Ostrzeżenie: (0%)
-----


głupi błąd ... dziękuje smile.gif
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 24.07.2025 - 12:38