[HTML / JS] Mozilla volgt onclick commando niet.

Pagina: 1
Acties:

  • Reveller
  • Registratie: Augustus 2002
  • Laatst online: 05-12-2022
In mijn CMS heb ik een knop gemaakt. Als je daarop klikt, moet je doorgestuurd worden naar een bepaalde pagina:
HTML:
1
2
<form><input type="button" value="Aanpassen" 
onclick="document.location.href('http://localhost/cms/admin/menu');"></form>

In IE werkt dit perfect, maar niet in Mozilla en andere browsers. Die reageren simpelweg niet als je op de knop klikt. Ik heb onder andere de form tag uitgebreid met name="menu", maar dit verandert niets.

Wat doe ik verkeerd :?

"Real software engineers work from 9 to 5, because that is the way the job is described in the formal spec. Working late would feel like using an undocumented external procedure."


  • André
  • Registratie: Maart 2002
  • Laatst online: 18-05 16:30

André

Analytics dude

code:
1
2
<form><input type="button" value="Aanpassen" 
onclick="location.href='http://localhost/cms/admin/menu';"></form>

[ Voor 30% gewijzigd door André op 21-09-2004 13:48 ]


  • Rickets
  • Registratie: Augustus 2001
  • Niet online

Rickets

Finger and a shift

documentwindow.location.href!! :P
En je roept href nu aan als functie, terwijl het een property is

En mag ik vragen waarom je niet gewoon een anchor gebruikt?

[ Voor 23% gewijzigd door Rickets op 21-09-2004 13:39 ]

If some cunt can fuck something up, that cunt will pick the worst possible time to fucking fuck it up, because that cunt’s a cunt.


  • Reveller
  • Registratie: Augustus 2002
  • Laatst online: 05-12-2022
Zeg, bedankt! En nu ik er over nadenk - dit is natuurlijk de officiele manier. Toch gek hoe je in een kringetje kunt blijven gaan in je uppie :)

"Real software engineers work from 9 to 5, because that is the way the job is described in the formal spec. Working late would feel like using an undocumented external procedure."