Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1566 connectés 

  FORUM HardWare.fr
  Programmation

  [HTML] comment pâsser un parametre dans une frame ?

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[HTML] comment pâsser un parametre dans une frame ?

n°47601
shinjo
Steve MCGouwine
Posté le 18-07-2001 à 16:04:19  profilanswer
 

j'appelle une page composée de frames avec un parametre..
 
est-ce que qqn sait comment passer ce parametre au pages qui composent la frame ?


---------------
Speeding is like farting; you should know when it's appropriate !
mood
Publicité
Posté le 18-07-2001 à 16:04:19  profilanswer
 

n°47609
shinji
Posté le 18-07-2001 à 16:13:07  profilanswer
 

en php c'est très facile de récupérer quoi que ce soit mais uniquement en HTML je sais même pas si c'est possible?

n°47611
jujucmoi
Posté le 18-07-2001 à 16:14:53  profilanswer
 

pas l'air evident... Si il n'y a pas de lien de parenté entre tes pages... Ne pourrais-tu concevoir ta page initiale dans un frame elle-meme (qui prendrait toute la taille de la fenetre), ainsi que ta page à qui tu veux passer un param. ça permet d'avoir un "lien" entre les pages...
Ou bien .. tu peux essayer avec un bete cookie.

n°47614
shinjo
Steve MCGouwine
Posté le 18-07-2001 à 16:18:56  profilanswer
 

shinji a écrit a écrit :

en php c'est très facile de récupérer quoi que ce soit mais uniquement en HTML je sais même pas si c'est possible?  




 
hey !  :hello:  presques jumeaux de pseudo !
 
tu peut me dire comment tu fait en php stp ?


---------------
Speeding is like farting; you should know when it's appropriate !
n°47621
shinji
Posté le 18-07-2001 à 16:39:54  profilanswer
 

exemple:
 
Dans un fichier HTML:
 
<A HREF="http://localhost/tonfichier.php?var1=toto&var2=titi> nom du lien </A>
 
 
 
Dans le fichier "tonfichier.php":
echo $var1."<br>"; //affiche toto
echo $var2;        //affiche titi

n°47701
shinjo
Steve MCGouwine
Posté le 18-07-2001 à 21:51:36  profilanswer
 

bah justement ça passe pas ça passe dans la page qui 'contient' les frames mais pas dans les pages qui la 'composent'
 
heu je sait pas si je ma bien fait comprendre la :pt1cable:


---------------
Speeding is like farting; you should know when it's appropriate !
n°47739
shinji
Posté le 19-07-2001 à 09:09:27  profilanswer
 

T'as qu'a faire la page qui contient les frames en php. Tu lui envoi le paramètre et elle renvoi ces paramètres aux pages qui la composent.

n°47749
shinjo
Steve MCGouwine
Posté le 19-07-2001 à 09:57:25  profilanswer
 

bah vi mais justement je fai un printf dnasq la page qui contient pour appeler les pages qui composent
 
mais le pb c que ça marche po...
 
  <?printf("<a href=\"Form.php3/?center=%s&nomsup=%s\" target=\"mainFrame\"><img src=\"images/create.gif\" width=\"24\" height=\"24\" border=\"0\"></a>" ,$center,$nomsup);?><br>


---------------
Speeding is like farting; you should know when it's appropriate !
n°47760
shinji
Posté le 19-07-2001 à 10:13:30  profilanswer
 

Essaye plutôt ça :
 
<?
echo "<a href=\"Form.php3/?center=".$center."&nomsup=".$nomsup."\" target=\"mainFrame\"><img src=\"images/create.gif\" width=\"24\" height=\"24\" border=\"0\"></a>";
echo "<br>";
?>

n°47772
shinjo
Steve MCGouwine
Posté le 19-07-2001 à 10:29:16  profilanswer
 

bah y me fait un truc bizarre :
 
/tr-report/dev/frameg.php3/Form.php3/?center=Rom&nomsup=Adam.C
 
il m'inclus ma page dans la precedente  :??:

 

[edtdd]--Message édité par shinjo--[/edtdd]


---------------
Speeding is like farting; you should know when it's appropriate !
mood
Publicité
Posté le 19-07-2001 à 10:29:16  profilanswer
 

n°47777
shinji
Posté le 19-07-2001 à 10:35:48  profilanswer
 

C'est tes liens non?
Fait voir le code de la page principale(qui appelle les frames) et celui des frames (en entier).
Avec tout ça, tu devrais y arriver!

n°47782
shinjo
Steve MCGouwine
Posté le 19-07-2001 à 10:42:32  profilanswer
 

page contenant :
 
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<frameset cols="153,1%" frameborder="NO" border="0" framespacing="0" rows="*">  
<? printf("<frame name=\"leftFrame\" scrolling=\"NO\" noresize src=\"frameg.php3/?center=%s&nomsup=%s\" >" ,$center,$nomsup); ?>
<frame name="mainFrame" src="framed.php3">
</frameset>
<noframes>
<body bgcolor="#FFFFFF" text="#000000">
</body>
</noframes>  
</html>


---------------
Speeding is like farting; you should know when it's appropriate !
n°47784
shinjo
Steve MCGouwine
Posté le 19-07-2001 à 10:43:07  profilanswer
 

page ou se trouve le lien :
 
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
 
<body bgcolor="#FFFFFF" text="#000000">
<table width="143" border="0" cellspacing="0" cellpadding="0" align="center" height="500">
  <tr>  
    <td width="13" height="9"><img border=0 height=16 src="file:///Q|/devsite/administratif/images/htgch.gif" width=18></td>
    <td background="file:///Q|/devsite/administratif/images/ht.gif" height="16" width="102"><img border=0 height=16 src="file:///Q|/devsite/administratif/images/ht.gif" width=5></td>
    <td width="28" height="9"><img border=0 height=16 src="file:///Q|/devsite/administratif/images/htdt.gif" width=18></td>
  </tr>
  <tr>  
    <td width="13" background="file:///Q|/devsite/administratif/images/gch.gif" rowspan="2" ><img border=0 height=8 src="file:///Q|/devsite/administratif/images/gch.gif" width=18></td>
    <td width="102" valign="top" height="101"></td>
    <td background="file:///Q|/devsite/administratif/images/drt.gif" width="28" rowspan="2" ><img src="images/drt.gif" width="18" height="4"></td>
  </tr>
  <tr>  
    <td width="102" valign="top" height="346">  
      <div align="center">  
        <p align="center">
<?
echo "<a href=\"Form.php3/?center=".$center."&nomsup=".$nomsup."\" target=\"mainFrame\"><img src=\"images/create.gif\" width=\"24\" height=\"24\" border=\"0\"></a>";
echo "<br>";
?>  
          <b><font size="2">Initialiser un incident</font></b></p>
        <p align="center"><img src="images/execute.gif" width="20" height="20"><br>
          <font size="2"><b>Clore un incident</b></font></p>
        <p align="center"><img src="images/list_internaut.gif" width="24" height="24"><br>
          <b><font size="2">Reporting</font></b> </p>
        <p> </p>
      </div>
    </td>
  </tr>
  <tr>  
    <td width="13"><img border=0 height=16 src="file:///Q|/devsite/administratif/images/bsgch.gif" width=18></td>
    <td background="file:///Q|/devsite/administratif/images/bas.gif" height="16" width="102"><img border=0 height=16 src="file:///Q|/devsite/administratif/images/bas.gif" width=5></td>
    <td width="28"><img border=0 height=16 src="file:///Q|/devsite/administratif/images/bsdt.gif" width=18></td>
  </tr>
</table>
</body>
</html>

 

[edtdd]--Message édité par shinjo--[/edtdd]


---------------
Speeding is like farting; you should know when it's appropriate !
n°47785
shinjo
Steve MCGouwine
Posté le 19-07-2001 à 10:43:41  profilanswer
 

la page appelant a bien les variable j'ai fait un print...
 
je comprend plus rien...


---------------
Speeding is like farting; you should know when it's appropriate !
n°47791
shinji
Posté le 19-07-2001 à 10:53:49  profilanswer
 

la page "qui contient le lien" c'est framed.php3 ou frameg.php3 ou c'est la page qui appelle ta page "page contenant"???
T'as combien de pages?
J'ai du mal à m'y retrouver

n°47797
shinjo
Steve MCGouwine
Posté le 19-07-2001 à 10:59:38  profilanswer
 

g 4 pages :
 
une qui 'contient' les frame
la frame de gauche qui continet le lein  
la frame de droite par defaut (qui est vide)
la frame de droite avec le formulaire (form.php3) (celle qui est appelée par le lien)
 
 
voila
 
merci pour toute l'aide que tu m'apporte  :jap:


---------------
Speeding is like farting; you should know when it's appropriate !
n°47808
shinji
Posté le 19-07-2001 à 11:30:31  profilanswer
 

ça y est, je m'y retrouve!
Avec ton code, ta page principale avec les frames a une frame mainframe (qui "contient" le fichier frame.php3) et une frame gauche avec un lien.
Quand tu cliques sur le lien de la frame gauche, le contenu de la frame "mainframe" est remplacé par le fichier "form.php3".
 
Quel est ton problème, tu n'as pas accès à $center ou $nomsup dans "form.php3" dans ce cas vérifie le contenu des variables (elles contiennent peut être des caractères qui gènent->utilise la fonction addslashes($center).
Si c'est un problème de lien, met le chemin complet pour chaque lien : http://adresseIP/.../fichier.php
Sinon c'est quoi qui vas pas?

n°47810
shinjo
Steve MCGouwine
Posté le 19-07-2001 à 11:39:37  profilanswer
 

nan le pb est que au lieu de m'afficher form.php3 dans mainframe
 
il m'affiche frameg et si je matte dans les proprietes de la page pour voir l'url g :
 
http://.../tr-report/dev/frameg.ph [...] sup=Adam.C
 
tu vois ou est le pb ?
 
il me colle /frameg.php3 au milieux...
 
voila le code du lien :
 
<a href=\"Form.php3/?center=".$center."&nomsup=".$nomsup."\" target=\"mainFrame\"></a>


---------------
Speeding is like farting; you should know when it's appropriate !
n°47813
shinji
Posté le 19-07-2001 à 11:49:11  profilanswer
 

ça me parraît louche ou c'est fait exprès?
une frame de 153?? et 1%??
C'est pas plutôt "15%,31%"!
à la place de :
<frameset cols="153,1%" frameborder="NO" border="0" framespacing="0" rows="*">  
Sinon essaye les liens entier vers tes fichiers.
Sinon je vois pas et regarde le code des frames clique droit, afficher la source et regarde s'il y a pas un truc bizarre)
A la limite affiche la source et montre la moi.

n°47817
shinjo
Steve MCGouwine
Posté le 19-07-2001 à 11:58:16  profilanswer
 

heu pour la frame c du 'dreamweaver generated'... :sweat:  
 
le pire c qu'elle marcue comme ça !
 
voila la source affichée de mon frameset :
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<frameset cols="153,1%" frameborder="NO" border="0" framespacing="0" rows="*">  
<frame name="leftFrame" scrolling="NO" noresize src="frameg.php3/?center=Rom&nomsup=Adam.C" ><frame name="mainFrame" src="framed.php3">
</frameset>
<noframes>
<body bgcolor="#FFFFFF" text="#000000">
</body>
</noframes>  
</html>

 
de ma frame de gauche :
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
 
<body bgcolor="#FFFFFF" text="#000000">
<table width="143" border="0" cellspacing="0" cellpadding="0" align="center" height="500">
  <tr>  
    <td width="13" height="9"><img border=0 height=16 src="file:///Q|/devsite/administratif/images/htgch.gif" width=18></td>
    <td background="file:///Q|/devsite/administratif/images/ht.gif" height="16" width="102"><img border=0 height=16 src="file:///Q|/devsite/administratif/images/ht.gif" width=5></td>
    <td width="28" height="9"><img border=0 height=16 src="file:///Q|/devsite/administratif/images/htdt.gif" width=18></td>
  </tr>
  <tr>  
    <td width="13" background="file:///Q|/devsite/administratif/images/gch.gif" rowspan="2" ><img border=0 height=8 src="file:///Q|/devsite/administratif/images/gch.gif" width=18></td>
    <td width="102" valign="top" height="101"></td>
    <td background="file:///Q|/devsite/administratif/images/drt.gif" width="28" rowspan="2" ><img src="images/drt.gif" width="18" height="4"></td>
  </tr>
  <tr>  
    <td width="102" valign="top" height="346">  
      <div align="center">  
        <p align="center">
<a href="Form.php3/?center=Rom&nomsup=Adam.C" target="mainFrame"><img src="images/create.gif" width="24" height="24" border="0"></a><br>  
          <b><font size="2">Initialiser un incident</font></b></p>
        <p align="center"><img src="images/execute.gif" width="20" height="20"><br>
          <font size="2"><b>Clore un incident</b></font></p>
        <p align="center"><img src="images/list_internaut.gif" width="24" height="24"><br>
          <b><font size="2">Reporting</font></b> </p>
        <p> </p>
      </div>
    </td>
  </tr>
  <tr>  
    <td width="13"><img border=0 height=16 src="file:///Q|/devsite/administratif/images/bsgch.gif" width=18></td>
    <td background="file:///Q|/devsite/administratif/images/bas.gif" height="16" width="102"><img border=0 height=16 src="file:///Q|/devsite/administratif/images/bas.gif" width=5></td>
    <td width="28"><img border=0 height=16 src="file:///Q|/devsite/administratif/images/bsdt.gif" width=18></td>
  </tr>
</table>
</body>
</html>

 
 :??:  :??:  :??:


---------------
Speeding is like farting; you should know when it's appropriate !
n°47838
shinji
Posté le 19-07-2001 à 13:30:35  profilanswer
 

Je vois pas, met le nom entier des chemins:
 
http:\\N°IP\chemin\fichier.php
 
C'est peut ê à cause de ça?

n°47855
shinjo
Steve MCGouwine
Posté le 19-07-2001 à 14:18:09  profilanswer
 

bah ct pas ça non plus mais y'a du avoir un mracle je suis parti manger... et now ça marche :pt1cable:  :pt1cable:  :??:  :ouch:  
 
 
qui a dit que l'informatique etait un science exacte ?  :crazy:
 
en tout cas shinji merci encore pour toute ton aide  :jap:  :jap:


---------------
Speeding is like farting; you should know when it's appropriate !
mood
Publicité
Posté le   profilanswer
 


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation

  [HTML] comment pâsser un parametre dans une frame ?

 

Sujets relatifs
[HTML/JAVASCRIPT][Javascript / HTML]
[HTML] <MAP><AREA ...></MAP> et defilement verticale pb ![Javascrip] comment récuperer la postion en pix. d'un objet html
Moteur de transformation XML->HTML;cHTML;WML[HTML / PHP] pb de formulaire /!\ question aux pros !
[HTML et Scripts] changer la couleur des ascenseurs ?[HTML/CSS] Mettre une couleur de body dans un css
[HTML] onchange dans un select, avec adresse et parametre. 
Plus de sujets relatifs à : [HTML] comment pâsser un parametre dans une frame ?


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR