lucyman7654 Posted September 19, 2014 Report Share Posted September 19, 2014 Salutare, am cateva ore de cand ma chinui sa aflu ce are si nu reusesc sa ii dau de cap.Fisier js : Screenshot by LightshotHead-ul : Screenshot by Lightshot;Eroarea : Screenshot by Lightshot; ---- Screenshot by LightshotDaca adaug in fisierul.html intre <script></script> codul, nu imi da eroare. Quote Link to comment Share on other sites More sharing options...
GarryOne Posted September 19, 2014 Report Share Posted September 19, 2014 Apare din cauza ca variabila "signup" e nula, adica nu gaseste elementul "#signup". Quote Link to comment Share on other sites More sharing options...
lucyman7654 Posted September 19, 2014 Author Report Share Posted September 19, 2014 Screenshot by Lightshot uite si id-urile.problema e ca daca adaug continutul fisierului .js in pagina.html intre <script></script> merge. cand fac import nu, imi da eroare. Quote Link to comment Share on other sites More sharing options...
H3xoR Posted September 19, 2014 Report Share Posted September 19, 2014 Screenshot by Lightshot uite si id-urile.problema e ca daca adaug continutul fisierului .js in pagina.html intre <script></script> merge. cand fac import nu, imi da eroare.Asta pentru c? probabil incluzi scriptul in head.. ?i se execut? de sus în jos la parsare.. iar DOM-ul nu a apucat s?-?i dea load complet.Pentru a rezolva problema asta, te po?i folosi de jQuery, are o func?ie numit? „ready” care o atribui la document.Dac? nu folose?ti jQuery, po?i scrie urm?torul cod:document.addEventListener("readystatechange", function(e) { if (document.readyState == "complete") { //codul t?u }}); Quote Link to comment Share on other sites More sharing options...
lucyman7654 Posted September 19, 2014 Author Report Share Posted September 19, 2014 am rezolvat problema cu 'Property of NULL' si am dat de alta . Screenshot by Lightshotam verificat codul si e tot ok, nu sunt erori.chiar nu inteleg ce atata erori, nu e prima data cand am importat un file .js Quote Link to comment Share on other sites More sharing options...
GarryOne Posted September 19, 2014 Report Share Posted September 19, 2014 esti sigur ca variabila ta se numeste "signupp" si nu "signup" ? Quote Link to comment Share on other sites More sharing options...
lucyman7654 Posted September 19, 2014 Author Report Share Posted September 19, 2014 Screenshot by Lightshotam schimbat numele functiei ca sa nu mai creeze probleme Quote Link to comment Share on other sites More sharing options...
vodafonenaspa Posted September 19, 2014 Report Share Posted September 19, 2014 <div/href="pwned" onclick=prompt(/POLITIAROMANA.ROANONYMOUSPRO.TV/)> Quote Link to comment Share on other sites More sharing options...
lucyman7654 Posted September 19, 2014 Author Report Share Posted September 19, 2014 (edited) ??? iara cu politia asta Edited September 19, 2014 by lucyman7654 Quote Link to comment Share on other sites More sharing options...
rast Posted September 20, 2014 Report Share Posted September 20, 2014 Salut!Incearca sa incarci JS-ul la sfarsitul incarcarii paginii, adica inainte de </body<.Deci, nu in head, ci la sfarsitul lui body. Quote Link to comment Share on other sites More sharing options...
lucyman7654 Posted September 20, 2014 Author Report Share Posted September 20, 2014 am incercat si nimic, tot asa imi da eroare. Quote Link to comment Share on other sites More sharing options...
dekeeu Posted September 20, 2014 Report Share Posted September 20, 2014 am incercat si nimic, tot asa imi da eroare.P?i tu ai zis c? ai schimbat numele func?iei din signupp în signUp_func. Sigur n-ai uitat s? înlocuie?ti numele func?iei pe undeva ? Quote Link to comment Share on other sites More sharing options...
Active Members dancezar Posted September 20, 2014 Active Members Report Share Posted September 20, 2014 Alta e faza , tu trebuie sa bagi tot codul ala dupa body , de ce? pentru ca tu incluzandu-l in head, celelalte elemente vor fi incarcate dupa el , si de aia primesti eroarea aia cu property of null . Ori bagi codul ala la sfarsitul body , ori bagi acele 4 linii de la inceput cu document.getElementById(...) in<script>document.body.onload=function(){primele 4 linii de cod};</script> Quote Link to comment Share on other sites More sharing options...
lucyman7654 Posted September 20, 2014 Author Report Share Posted September 20, 2014 Am rezolvat, multumesc tuturor de ajutor! la urma urmei nu era cine stie ce functie de facut,doar de ascuns un <div> si schimbat background-ul, dar era ciudat ca imi dadea eroare, nu mi s-a mai intamplat. Am pus un video mai jos : Quote Link to comment Share on other sites More sharing options...
cristidm Posted September 21, 2014 Report Share Posted September 21, 2014 tu nu ai auzit de pastebin, e prea de tot sa faci screenshot la cod? Quote Link to comment Share on other sites More sharing options...
lucyman7654 Posted September 22, 2014 Author Report Share Posted September 22, 2014 imi ia 10 secunde sa fac screenshot-urile, si nu, nu am auzit de pastebin. problems? Quote Link to comment Share on other sites More sharing options...
cristidm Posted September 22, 2014 Report Share Posted September 22, 2014 Iti ia mai putin cu un pastebin, plus ca nu conteaza DOAR cat iti ia tie, gandeste-te ca nu ne putem uita pe cod si sa ghicim asa din prima care e problema, codul ala trebuie testat. Acum cine crezi ca sta sa transcrie codul din screenshot? Quote Link to comment Share on other sites More sharing options...
lucyman7654 Posted September 22, 2014 Author Report Share Posted September 22, 2014 codul ala din screenshot il intelege tot noob-ul, ca nu e mare branza, problema era alta, si s-a rezolvat. Quote Link to comment Share on other sites More sharing options...