Otóż mam problem dotyczący javaskryptów.
skorzystałem ze skryptu który przerobił fan_pascala w tym temacie http://forum.webinside.pl/viewtopic.php?t=12597
oto skrypt:
Kod: Zaznacz cały
<head>
<script>
function val(){
if (document.form1.pass.value.length < 5){
document.getElementById('quality').innerHTML = "Słabe";
}
if (document.form1.pass.value.length > 5){
document.getElementById('quality').innerHTML = "Średnie";
}
}
</script>
</head>
<body onload="val()">
<form NAME="form1" method="POST">
<table>
<tr>
<td>Hasło
<font color="yellow">*</font>
</td>
<td>
<input name="pass" style="background-color: #AAAAAA " type="password" onkeypress = "return val();">
</td>
<td>
<font color="green">
<b>Siła hasła:</b><span id="quality"></span>
</font>
</td>
</tr>
</table>
</form>
</body>Gdy wstawiam "sam skrypt" wszystko działa, ale gy ta funkcja java jest razem z innymi funkcjami wtedy skrypt nie działa...
moje funkcje wraz z tą wyżej wyglądają tak:
Kod: Zaznacz cały
<script>
function val(){
if (document.form1.pass.value.length < 5){
document.getElementById('quality').innerHTML = "Słabe";
}
if (document.form1.pass.value.length > 5){
document.getElementById('quality').innerHTML = "Średnie";
}
}
</script>
<SCRIPT LANGUAGE="JavaScript">
<!-- Początek
var refer=true;
function combo() {
if (refer) {
document.all.contents.style.visibility="visible";
refer=false;
}
else {
document.all.contents.style.visibility="hidden";
refer=true;
}
}
// Koniec -->
</script>
<script language=JavaScript>
function emoticon(text) {
text = ' ' + text + ' ';
document.post.tresc.value += text;
document.post.tresc.focus();
}
</script>
<script language=JavaScript>
function text(text) {
text = ' ' + text + ' ';
document.post.plec.value += text;
document.post.plec.focus();
}
</script>
<BODY onLoad="start()">
<script language="JavaScript">
function big(lyr) {
document.all[lyr].style.height='270px'; }
function small(lyr) {
document.all[lyr].style.height='30px';
}
function start() {
document.all.Layer1.style.height='30px';
document.all.Layer2.style.height='30px';
document.all.Layer3.style.height='30px'; }
//-- !>
</script>