Javascript & frames

cs_CHABRY Messages postés 42 Date d'inscription samedi 19 mars 2005 Statut Membre Dernière intervention 17 juillet 2007 - 22 avril 2005 à 00:11
GhislainLavoie Messages postés 289 Date d'inscription vendredi 11 mars 2005 Statut Membre Dernière intervention 3 avril 2008 - 23 avril 2005 à 00:23
Bonjour!



J'ai essayé d'insérer dans un code en php des fonctionnalités de
javascript d'où j'ai pu effectuer l'ouverture d'une page .php suite à
la vérification d'un certaine condition.

If( condition )

{

echo '<script type="text/javascript">window.open("http://................/file.php");</script>'
;

}



ça a bien marché mais le problème que je veux spécifier un frame dans
lequel la page sera affichée ( tel que "target" pour les liens).

Comment faire?



MERCI!.

2 réponses

GhislainLavoie Messages postés 289 Date d'inscription vendredi 11 mars 2005 Statut Membre Dernière intervention 3 avril 2008 3
23 avril 2005 à 00:21
Salut!

Essai comme ceci :

If( condition )
{
echo '<script type="text/javascript">window.frames["nomDeLaFrame"].document.href=http://................/file.php;</script>'
;

}

A+, Ghislain
0
GhislainLavoie Messages postés 289 Date d'inscription vendredi 11 mars 2005 Statut Membre Dernière intervention 3 avril 2008 3
23 avril 2005 à 00:23
Salut!

Essai comme ceci :

If( condition )
{

echo '<script type="text/javascript">window.frames["nomDeLaFrame"].document.href="http://................/file.php";</script>'
;

}

A+, Ghislain
0
Rejoignez-nous