View previous topic :: View next topic |
Author |
Message |
dabac
Joined: 30 May 2006 Posts: 57
|
Posted: 30.09.2006 14:46 Post subject: Checkbox - firefox? |
|
|
U formi fqlogin postoji checkbox zapamtime.
Postoji link kojim se ukljucuje i iskljucuje checkbox:
Code: |
<a href="javascript:zapamtime()">...</a>
function zapamtime() {
if (document.fqlogin.zapamtime.checked) {
alert('je');
document.fqlogin.zapamtime.checked=false;
} else {
alert('nije');
document.fqlogin.zapamtime.checked=true;
}
}
|
Ovo radi u IE i Operi.
Alerte sam stavio kako bih malo zaustavio Firefox: on doista promijeni stanje checkboxa, a odmah nakon toga ga vrati u prijasnje stanje...
Moze li mi netko pomoci da to ispravim - odnosno neku funkciju koja ce raditi u sva tri browsera? |
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Sulien
![](images/avatars/116771498344a191023de11.png)
Joined: 04 Jan 2004 Posts: 2905 Location: Zagreb
|
Posted: 30.09.2006 16:16 Post subject: |
|
|
Ja ću ti pomoći... izbriši link, izbriši javascript
Uz checkbox asociraj LABEL "zapamti me" i kad netko stisne checkbox ili tekst labela, checkbox će promijeniti stanje
Nemoj izmišljati toplu vodu ![Wink](images/smiles/icon_wink.gif) |
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
dabac
Joined: 30 May 2006 Posts: 57
|
Posted: 30.09.2006 16:30 Post subject: |
|
|
Pa vec sam i imao label (moja greska, nisam postao taj dio koda):
<label style="font-size: 9px">
<input name="zapamtime" type="checkbox" id="zapamtime" value="1">
<a href="javascript:zapamtime()" class="neunder">Zapamti me</a>
</label> |
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
dabac
Joined: 30 May 2006 Posts: 57
|
Posted: 30.09.2006 16:54 Post subject: |
|
|
Sulien wrote: | Ja ću ti pomoći... izbriši link, izbriši javascript
Uz checkbox asociraj LABEL "zapamti me" i kad netko stisne checkbox ili tekst labela, checkbox će promijeniti stanje
Nemoj izmišljati toplu vodu ![Wink](images/smiles/icon_wink.gif) |
Probao sam sa
Code: |
<label>
<input name="zapamtime" type="checkbox" id="zapamtime" value="1">
zapamti me</label>
|
a sad radi u FF, ali ne radi u IE; meni je bitnije da radi u IE pa sam izbacio label i sad radi u sva 3 browsera:
Code: |
<input name="zapamtime" type="checkbox" id="zapamtime" value="1">
<a href="javascript:zapamtime()" class="neunder">Zapamti me</a>
|
Ne znam koji ce mi ***** taj label ako ne radi u IE... |
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
sinke
![](images/avatars/1149866524b1196ef1ca38.gif)
Joined: 02 Oct 2005 Posts: 257 Location: Zagreb
|
Posted: 30.09.2006 18:03 Post subject: |
|
|
Code: | <label for="zapamtime">zapamti me</label>
<input name="zapamtime" type="checkbox" id="zapamtime"> |
|
_________________ THE SHTANZIG | Web Do's & Don'ts |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
nel`chee
![](images/avatars/3994668404ef986987ff64.gif)
Joined: 08 Jul 2004 Posts: 2087 Location: Rijeka
|
Posted: 30.09.2006 18:11 Post subject: |
|
|
Code: | <label>
<input name="zapamtime" type="checkbox" id="zapamtime" />
Zapamti me
</label> |
ili
Code: | <input name="zapamtime" type="checkbox" id="zapamtime" />
<label for="zapamtime">Zapamti me</label> |
zatvarajte inpute ![Rolling Eyes](images/smiles/icon_rolleyes.gif) |
_________________ ♥ art & design portfolio ♥ free Photoshop brushes stuff ♥ sketchblog ♥ facebook ♥ |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
sinke
![](images/avatars/1149866524b1196ef1ca38.gif)
Joined: 02 Oct 2005 Posts: 257 Location: Zagreb
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
nel`chee
![](images/avatars/3994668404ef986987ff64.gif)
Joined: 08 Jul 2004 Posts: 2087 Location: Rijeka
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
sinke
![](images/avatars/1149866524b1196ef1ca38.gif)
Joined: 02 Oct 2005 Posts: 257 Location: Zagreb
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
red
![](images/avatars/242328301439ed761a6053.gif)
Joined: 03 May 2004 Posts: 919 Location: Zabok
|
Posted: 30.09.2006 21:09 Post subject: |
|
|
Mislla je da se jednostruki tagovi u XHTML-u zatvaraju forward slashem. |
_________________ Get busy living, or get busy dying. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
sinke
![](images/avatars/1149866524b1196ef1ca38.gif)
Joined: 02 Oct 2005 Posts: 257 Location: Zagreb
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
nel`chee
![](images/avatars/3994668404ef986987ff64.gif)
Joined: 08 Jul 2004 Posts: 2087 Location: Rijeka
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
maratz mi3.crew
![](images/avatars/403.gif)
Joined: 24 Nov 2003 Posts: 1207 Location: ZAG
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|