Chemin parent.location.href
bonjour,
je suis dans une page recherche.php
Code:
1 2 3 4 5 6 7 8 9 10
| <html>
<head>
</head>
<frameset cols="300,*" rows="*" frameborder="YES" bordercolor="#CCCCCC" border="0" framespacing="0">
<frame src="menu.php" name="gauche" frameborder="0" bordercolor="#CCCCC" border="0" scrolling="NO"/>
<frame src="recherche.php" name="droite" frameborder="0" bordercolor="#CCCCC" border="0"/>
</frameset>
<noframes>
</noframes>
</html> |
dont voici la frame index.php
J'ai un bouton pour modifier un élément de liste dans recherche.php
sur ce bouton, j'effectue une action :
Code:
1 2 3 4 5 6
| $('.update').click(function(event){
event.preventDefault();
var $el = $(this);
var id = $el.data('id');
parent.location.href="app/structures/index.php?consult1=1&id=" + id;
}); |
Ceci marche très bien sous Firefox, Chrome.
Mais sous IE, il renvoi la page vers le chemin suivant :
app/structures/app/structures/index.php?consult1=1&id=3
j'ai donc 2 fois une partie de mon chemin, et je suis donc en erreur 404.
Comment puis-je faire une correction uniquement pour IE ou un code valable pour tous les navigateurs.
Merci par avance.