transfert d'un script dans une iframe vers une autre page que l'iframe ???

Répondre


Cette question est un moyen d’empêcher des soumissions automatisées de formulaires par des robots.
Smileys
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: =D> #-o =P~ :^o :non: :priere: 8-|
Voir plus de smileys
  Revue du sujet
 

  Étendre la vue Revue du sujet : transfert d'un script dans une iframe vers une autre page que l'iframe ???

par Brunochp » 05 mars 2009, 16:45

Personne n'aurait une idée ? SVP

par Ryle » 05 mars 2009, 13:06

Modération :
Brunochp, afin d'améliorer la lisibilité de ton message,
pense à utiliser les balises [code] ou [php] (selon le langage utilisé).

Elles sont disponibles au-dessus de la zone de saisie de ton message
lorsque tu postes un nouveau message.

Des indications sont disponibles sur la manière de mettre en forme vos messages dans la FAQ

par Brunochp » 05 mars 2009, 12:47

voici le contenu de mon scritp php
<?php
include_once("req_connecter.php");

session_start();
if($lng==""){
$lang=$lng;
$_SESSION["lang"]=$lang;
}else{
$lang=$_SESSION["lang"];
}

include_once("langue.php");

if($search==1){ include_once("biens_liste2.php"); exit(); }

?>
<html>
<head>
<title>Rechercher</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body { background-color: #FFFFFF;}
body,td,th { font-family: Arial,; font-size: 12px; color: #fdfdfd; font-style: normal; line-height: normal; font-weight: 100;}
a { font-size: 24px; color: #FAC634; font-weight: bold;}
a:visited { color: #000000; text-decoration: none;}
a:hover { color: #645D90; text-decoration: none;}
a:active { color: #645D90; text-decoration: none;}
a:link { text-decoration: none; color: #990000;}

a.standard { font-family: Arial, font-size: 16px; color: #333333;}
a.standard:link { text-decoration: none; color: #333333;}
a.standard:visited { text-decoration: none; color: #333333;}
a.standard:hover { text-decoration: none; color: #990000;}
a.standard:active { text-decoration: none; color: #333333;}
.Style14 {color: #000000}
.Style24rouge { font-size: 24px; font-weight: bold; font-family: Arial, Helvetica, sans-serif; color: #000000; font-style: normal; line-height: normal; font-variant: normal;}
h1,h2,h3,h4,h5,h6 { font-family: Arial, Helvetica, sans-serif; font-style: bold;}
h2 { font-size: 12px; color: #000000;}

INPUT.i1, TEXTAREA.i1, SUBMIT.i1, SELECT.i1, OPTION.i1, BUTTON.i1 {
border-style: solid; border-width: 1px; border-color:#999999; background-color: #FFFFFF; font-size: 9pt; font-family: arial, helvetica, sans serif;
}

table.t1, table.t3 { border-spacing: 0; }

td.t1 { border-color: #000000;
border-style: solid;
margin: 0px;
padding: 0px;
border-width: 1px 1px 1px 1px;
}
td.t2 { border-color: #000000;
border-style: solid;
margin: 0px;
padding: 0px;
border-width: 0px 1px 1px 1px;
}

td.t3 { border-color: #000000;
border-style: solid;
margin: 0px;
padding: 0px;
border-width: 0px 1px 0px 0px;
}
.Style25 {color: #FFFFFF; font-size: 14px; font-weight: bold; }

-->
</style>
<script language="javascript">
function srch(){
document.regform.search.value=1;
document.regform.submit();
}

function init(){
document.regform.bienville.value="";
document.regform.biensecteur.value="";
document.regform.biensurfacemini.value="";
document.regform.biensurfacemaxi.value="";
document.regform.tybiref.value=0;
document.regform.submit();
}
</script>

</head>
<body>
<form method="post" name="regform" action="plan_secteurs2.php">
<p>
<input type="hidden" name="search" value="">
</p>
<div align="left">
<table width="602" height="513" border="0">
<tr>
<td width="461" height="509"><table width="100%" height="505" border="1" cellpadding="0" cellspacing="1" bordercolor="#FFFFFF" style="border-collapse: collapse">
<tr>
<td height="503"><div align="left">
<table width="100%" border="0" cellpadding="5" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#FFFFFF" style="border-collapse: collapse">
<tr bgcolor="#FFFFFF">
<td width="635" height="17" bordercolor="#FFFFFF" bgcolor="#666666" ><table width="370" border="0">
<tr>
<td width="129"><div align="left"><span class="Style25"><font face='Arial'>BIEN RECHERCHE</font></span></div></td>
<td width="231">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="17" bordercolor="#FFFFFF" ><table width="445" border="0">
<tr>
<td width="6" height="30">&nbsp;</td>
<td width="159" align="right" valign="middle" bordercolor="#FFFFFF" background="#FFFFFF" bgcolor="#FFFFFF" class="Style14" ><h2 align="left"> <br>
<?php echo $lg[50]; ?></h2></td>
<td width="139" align="left" valign="middle" background="#FFFFFF" class="Style14" ><select class="i1" name="tybiref">
<option value="0"><?php echo $lg[1]; ?></option>
<?php
$order="1";
if($lang=="en"){ $order="2"; }
if($lang=="it"){ $order="3"; }
if($lang=="de"){ $order="4"; }
if($lang=="su"){ $order="5"; }
if($lang=="fi"){ $order="6"; }
$SQL="SELECT * FROM types_de_biens WHERE tybisuppr=0 ORDER BY tybinom".$order;
$affichage=mysql_query($SQL);
$nb=mysql_numrows($affichage);
if($nb){
while($ligne=mysql_fetch_array($affichage)){
$tybiref2=stripslashes($ligne["tybiref"]);
$tybinom=stripslashes($ligne["tybinom1"]);
$tybinom2=stripslashes($ligne["tybinom2"]);
$tybinom3=stripslashes($ligne["tybinom3"]);
$tybinom4=stripslashes($ligne["tybinom4"]);
$tybinom5=stripslashes($ligne["tybinom5"]);
$tybinom6=stripslashes($ligne["tybinom6"]);
if($lang=="en"){ $tybinom=$tybinom2; }
if($lang=="it"){ $tybinom=$tybinom3; }
if($lang=="de"){ $tybinom=$tybinom4; }
if($lang=="su"){ $tybinom=$tybinom5; }
if($lang=="fi"){ $tybinom=$tybinom6; }
echo "<option value=\"".$tybiref2."\"";
if($tybiref==$tybiref2){ echo " selected"; }
echo ">".$tybinom."</option>";
}
}
?>
</select>
</td>
<td width="17" align="right" valign="middle" background="#FFFFFF" class="Style14" ><h2 align="left"></h2></td>
<td width="81" align="left" valign="middle" background="#FFFFFF" class="Style14" >&nbsp;</td>
<td width="17">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="17" bordercolor="#FFFFFF" >&nbsp;</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="17" bordercolor="#FFFFFF" bgcolor="#666666" ><table width="313" border="0">
<tr>
<td width="127" bordercolor="#FFFFFF" background="#FFFFFF"><div align="left"><span class="Style25"><font face='Arial'>TRANSACTION</font></span></div></td>
<td width="176" bordercolor="#FFFFFF" bgcolor="#666666">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="17" bordercolor="#FFFFFF" ><table width="445" border="0">
<tr>
<td width="6" height="30">&nbsp;</td>
<td width="159" align="right" valign="middle" background="#FFFFFF" class="Style14" ><h2 align="left"></h2></td>
<td width="139" align="left" valign="middle" background="#FFFFFF" class="Style14" ><input name="biencategorie2" type="checkbox" value="1" <?php if($biencategorie==1){ echo " checked"; } ?>>
<?php echo $lg[58]; ?><br>
<input name="biencategorie2" type="checkbox" value="2" <?php if($biencategorie==2){ echo " checked"; } ?>>
<?php echo $lg[59]; ?><br>
<input name="biencategorie2" type="checkbox" value="0" <?php if($biencategorie==0){ echo " checked"; } ?>>
<?php echo $lg[60]; ?> </td>
<td width="17" align="right" valign="middle" background="#FFFFFF" class="Style14" ><h2 align="left"></h2></td>
<td width="81" align="left" valign="middle" background="#FFFFFF" class="Style14" >&nbsp;</td>
<td width="17">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="17" bordercolor="#FFFFFF" >&nbsp;</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="17" bordercolor="#FFFFFF" bgcolor="#666666" ><div align="left">
<table width="313" border="0">
<tr>
<td width="98"><div align="left"><span class="Style25"><font face='Arial'>LOCALISATION</font></span></div></td>
<td width="205">&nbsp;</td>
</tr>
</table>
</div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="17" bordercolor="#FFFFFF" ><div align="left">
<div align="left">
<table width="445" border="0">
<tr>
<td width="4" height="30">&nbsp;</td>
<td width="88" align="right" valign="middle" bordercolor="#FFFFFF" background="#FFFFFF" class="Style14" ><h2 align="left"> <br>
<?php echo $lg[52]; ?> </h2></td>
<td width="102" align="left" valign="middle" background="#FFFFFF" class="Style14" ><select class="i1" name="bienville" onChange="document.regform.submit();">
<option value=""><?php echo $lg[1]; ?></option>
<?php
$SQL="SELECT DISTINCT bienville FROM biens WHERE biensuppr=0 AND bienvalide=1 ORDER BY bienville";
$affichage=mysql_query($SQL);
$nb=mysql_numrows($affichage);
if($nb){
while($ligne=mysql_fetch_array($affichage)){
$bienville2=stripslashes($ligne["bienville"]);
echo "<option value=\"".$bienville2."\"";
if($bienville2==$bienville){ echo " selected"; }
echo ">".$bienville2."</option>";
}
}
?>
</select></td>
<td width="108" align="right" valign="middle" background="#FFFFFF" class="Style14" ><h2 align="left"> <br>
<?php echo $lg[53]; ?> </h2></td>
<td width="103" align="left" valign="middle" background="#FFFFFF" class="Style14" ><select class="i1" name="biensecteur">
<option value=""><?php echo $lg[1]; ?></option>
<?php
if($bienville<>""){
$SQL="SELECT DISTINCT biensecteur FROM biens WHERE bienville='$bienville' AND biensuppr=0 AND bienvalide=1 ORDER BY biensecteur";
$affichage=mysql_query($SQL);
$nb=mysql_numrows($affichage);
if($nb){
while($ligne=mysql_fetch_array($affichage)){
$biensecteur2=stripslashes($ligne["biensecteur"]);
echo "<option value=\"".$biensecteur2."\"";
if($biensecteur2==$biensecteur){ echo " selected"; }
echo ">".$biensecteur2."</option>";
}
}
}
?>
</select></td>
<td width="14" valign="middle">&nbsp;</td>
</tr>
</table>
</div>
</div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="17" bordercolor="#FFFFFF" >&nbsp;</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="17" bordercolor="#FFFFFF" bgcolor="#666666" ><div align="left">
<table width="313" border="0">
<tr>
<td width="66"><div align="left"><span class="Style25"><font face='Arial'>SURFACE</font></span></div></td>
<td width="237">&nbsp;</td>
</tr>
</table>
</div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="17" bordercolor="#FFFFFF" ><div align="left">
<table width="445" border="0">
<tr>
<td width="148" height="30">&nbsp;</td>
<td width="40" align="right" valign="middle" background="#FFFFFF" class="Style14" ><?php echo $lg[54]; ?> :</td>
<td width="34" align="left" valign="middle" background="#FFFFFF" class="Style14" ><input name="biensurfacemini222" type="text" class="i1" size="4" maxlength="20" value="<?php echo $biensurfacemini; ?>"></td>
<td width="25" align="right" valign="middle" background="#FFFFFF" class="Style14" ><div align="center"><?php echo $lg[55]; ?> :</div></td>
<td width="155" align="left" valign="middle" background="#FFFFFF" class="Style14" ><input name="biensurfacemaxi22" type="text" class="i1" size="4" maxlength="20" value="<?php echo $biensurfacemaxi; ?>"></td>
<td width="17">&nbsp;</td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" background="tile_sub2.gif" height="20" align="center" class="Style14">&nbsp;</td>
</tr>
<tr>
<td bgcolor="#FFFFFF" background="tile_sub2.gif" height="20" align="center" class="Style14"><p>
<input type="button" onClick="srch();" name="Submit" value="<?php echo $lg[56]; ?>">
&nbsp;&nbsp;&nbsp;
<input type="button" onClick="init();" name="clr" value="<?php echo $lg[57]; ?>">
</p></td>
</tr>
</table>
</div> </tr>
</table></td>
<td width="131"><table width="126" height="240" border="0">
<tr>
<td height="236"><p><img src="logohaut2.gif" width="125" height="200"></p>
<p><br>
<br>
</p></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
<?php include_once("req_deconnecter.php"); ?>

où est ce que j'indique que la feuille de résultat(bien_liste2.php) doit apparaitre : http://ncbc.immobilweb.fr/index.php?opt ... Itemid=248


Merci d'avance

Bruno

par Ryle » 05 mars 2009, 12:32

Euh... non... target c'est une propriété de la balise lien <a>.

Lorsque tu utilises des frames ou des iframes, tu découpes ta page en plusieurs "fenêtres", comme si tu intégrais une espèce de mini-navigateur indépendant des autres frames. Ainsi, la navigation à l'intérieur d'une iframe se fait sans se soucier du fait qu'elle appartienne ou non à une autre page.

Afin de permettre d'interragir entre des frames, il faut leur donner un nom. Grace à ce nom, tu peux spécifier dans quelle "fenêtre" doit s'ouvrir un lien.

Code : Tout sélectionner

<iframe name="fenêtre_cible" ...>...</iframe> ... <a href="mon_lien.html" target="fenêtre_cible">...</a>
Ainsi, la page mon_lien.html va s'ouvrir à l'intérieur de l'iframe :)

Tu peux utiliser les valeurs suivantes :
- _self : (par défaut) ouvre le lien dans la fenêtre/frame courrante
- _blank : ouvre le lien dans une nouvelle fenêtre/onglet
- _top : ouvre le lien dans la fenêtre parente la plus haute (dans le cas d'une iframe, ca va ouvrir dans la fenêtre principale)
- nom_d'une_fenêtre : ouvre le lien dans la frame, iframe, fenêtre, popup, ... dont le nom est spécifié :)

par stopher » 05 mars 2009, 11:43

C'est un propriété de la balise iframe , donc dans la balise iframe ...

Je te laisse lire la doc à ce sujet ..

http://fr.selfhtml.org/html/frames/incorporees.htm
http://www.allhtml.com/articles/detail/375

Ch.

par Brunochp » 05 mars 2009, 11:40

Merci pour ta réponse met je le met où le target dans le script dans mon iframe ???

par stopher » 05 mars 2009, 09:02

Slt ,

Je n'utilise pas beaucoup ( pour ne pas dire dutout ) les iframes , mais as tu regardé de coté du paramètre target à l'intérieur de ta balise iframe ?

Car d'apres ce que j'ai vue , il n'y a pas de target , donc l'iframe pointe sur elle-même !


Maintenant , ce n'est qu'une idée ... je ne suis vraiment pas fan des iframe ( à tester donc ) :)

Ch.

par orgerix » 05 mars 2009, 00:00

Lorsque tu mets un lien, tu peux utiliser l'attribut target qui te permettra de spécifier l'iframe ou tu veux que ca s'affiche.

transfert d'un script dans une iframe vers une autre page qu

par Brunochp » 04 mars 2009, 23:41

Bonsoir, je développe un site d'immobilier, je rencontre un problème :

voici le site :
http://www.ncbc.fr (redirection)
http://ncbc.immobilweb.fr

Voici mon pb :

j' ai une page "nos offres" où il y a un script de recherche de biens qui renvoie sur une page résultat
j'ai créé un menu gauche avec une iframe (joomla) j'ai repris mon script mais celui ci appelle la page de résultat dans mon iframe j'aimerai bien qu'elle s'affiche dans la page nos offres.....

Merci de votre aide

Cordialement

Bruno