Probleme variable

Résolu
freddyoneone Messages postés 9 Date d'inscription samedi 27 novembre 2004 Statut Membre Dernière intervention 10 avril 2007 - 2 avril 2007 à 14:39
yousfane Messages postés 243 Date d'inscription vendredi 24 novembre 2006 Statut Membre Dernière intervention 21 décembre 2007 - 10 avril 2007 à 13:33
bonjour,  a vous tous 
je voulais juste poser une petite question sur un truc que je ne comprend pas !

voila, j'ai un petit probleme d'integration d'une variable dans une balise Iframe pour une popup et je ne comprend pas pourquoi cela ne marche pas !      si quelqu un peut m'expliquer ?

alors la variable d'affichage du popup qui fonctionne<!--coloro:#CC0000--><!--/coloro-->(mapage.htm)<!--colorc--><!--/colorc--> sans probleme.

<!--html1-->
mypopup(100, 200, 200, "<iframe src="mapage.htm" width="600" height="200" frameborder="0" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>");
<!--html2-->
<!--html3-->

... mais ca, ca ne fonctionne pas ! <!--coloro:#CC0000--><!--/coloro-->' +document.formSaisie.champurl.value+ '<!--colorc--><!--/colorc-->, et je ne comprend pas pourquoi, et ou est l'erreur ! (a part que l'erreur c'est pêut etre moi)

<!--html1-->mypopup(100, 200, 200, "<iframe src=" ' +document.formSaisie.champurl.value+ ' " width="600" height="200" frameborder="0" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>");
<!--html2-->
<!--html3-->

... et mon Input c'est ca !

<form onsubmit="return valider()" method="get" name="formSaisie">

bon , y a suremment des erreurs de toute maniere, parceque je ne suis pas non plus un superman du code , ca c'est sur ! mais j'essaye.
 merci  !

18 réponses

yousfane Messages postés 243 Date d'inscription vendredi 24 novembre 2006 Statut Membre Dernière intervention 21 décembre 2007 2
9 avril 2007 à 21:43
Salut
si tu veux ouvrire l'adresse du champurl tu peux faire ça

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns= "http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>essai</title>

<!-- ------------------- debut du CSS ------------------------------ -->
<style type="text/css">
<!--
body {
position:absolute; left: 50%; top: 5px; width: 760px;
height: 100%; margin-left: -590px; margin-top: 0; border: 1px solid #999;
background-color: #666;
}

.Pagecadencer-css {
 font-family: "Times New Roman", Times, serif;
 font-size: 9px;
 font-style: italic;
 color: #CCCCCC;
}
.style3 {
 color: #99CCFF;
 font-family: Arial, Helvetica, sans-serif;
 font-weight: bold;
 font-size: 16px;
 font-style: italic;
}
.style8 {font-size: 30px}
.style9 {color: #FFFFFF}
.style10 {font-family: "Times New Roman", Times, serif; font-size: 12px;}
.style11 {color: #999999; font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: 16px; font-style: italic; }
.style12 {color: #333333}

#bloc1  {position:absolute; left: 0px; top: 50px; width: 700px; height: 200px; margin-left: 0px; margin-top: 10px;  background-color: #893258; padding-left: 15px; padding-right: 55px; padding-top: 5px;}

#bloc2  {position:absolute; left: 5px; top: 280px; width: 780px; height: 100%; margin-left: 10px; margin-top: 0;  background-color: #523258; padding-left: 5px; padding-right: 5px; padding-top: 5px; padding-bottom: 5px;  }

-->
</style>
<!-- ------------------------ JAVASCRIPT ------------- -->
<SCRIPT LANGUAGE='Javascript'>
window.moveTo(0,0)
window.resizeTo(screen.width,screen.height)

<!--
var stickerX=0, stickerY=0;
var stickerVX=0.0, stickerVY=0.0;
var stickerAX=0.0, stickerAY=0.0;
var stickerCurX=1280, stickerCurY=-800;
var stickerWidth, stickerHeight;
var sticker_closed=true;
var stickHotX, stickHotY;
var notimeout = false;
var isIE6 = document.all && document.getElementById ? true : false;
var isNS6 = ! isIE6 && document.getElementById ? true : false;
var win_w, win_h;

function closeSticker(){
   sticker_closed = true;
   stickerX = -(stickerWidth+1000);
   moveSticker();
}

function initStickerPos(){
   var x, y;
    var layer = document.getElementById ('pub_perso');
y = -(stickerHeight+500);
x = -(stickerWidth+10);
   stickerCurX=x;
   stickerCurY=y;
     if (isIE6) {
          layer.style.pixelLeft = x;
          layer.style.pixelTop = y;
   }
     else if (isNS6) {
          layer.style.left = x+'px';
          layer.style.pixelTop = y+'py';
   }
}

function updateStickerTarget(){
   if(sticker_closed) return;
stickerY = 100;
if (isIE6) {
stickerX = document.body.clientWidth + document.body.scrollLeft;
}
else {
stickerX  = window.pageXOffset;
}
stickerX -= (stickerWidth+370);
   stickerVY += 10;
}
function onResize(){
   updateStickerTarget();
   notimeout = false;
   setTimeout('moveSticker()', 20);
}

function accelSticker(x, y){
   var dx, dy;
   dx= stickerX - x;
   dy= stickerY - y;
      stickerAX  = dx / 60;
      stickerAY  = dy / 60;
}

function moveSticker(){
   var x, y, ax, ay;
    var layer = document.getElementById ('pub_perso');
   accelSticker(stickerCurX, stickerCurY);
   stickerVX*=0.92;
   stickerVY*=0.92;
       stickerVX += stickerAX;
   stickerVY += stickerAY;
   stickerCurX+=stickerVX ;
   stickerCurY+=stickerVY ;
   x = Math.round(stickerCurX);
   y = Math.round(stickerCurY);
     if (isIE6) {
          layer.style.pixelLeft = x;
          layer.style.pixelTop = y;
   }
     else if (isNS6) {
          layer.style.left = x+'px';
          layer.style.pixelTop = y+'py';
   }
   if(x stickerX && y stickerY && stickerVX < 1 && stickerVY < 1){
      notimeout = true;
      saveSize();
        setTimeout('checkSize()', 1000);
   }
   else{
      notimeout = false;
        setTimeout('moveSticker()', 20);
   }
}
function saveSize(){
   if(isIE6){
      win_h = document.body.clientHeight;
      win_w = document.body.clientWidth;
   }
}

function checkSize(){
   if(notimeout == false) return;
   if(isIE6){
      if(win_w != document.body.clientWidth || win_h !=document.body.clientHeight)
         onResize();
      else
         setTimeout('checkSize()', 1000);
   }
}

function initSticker(width, height){
  sticker_closed=false;
  stickerWidth = width;
  stickerHeight = height;
  initStickerPos();
  updateStickerTarget();
  if(isIE6){
     for(i=1;i<=3;i++){
          xImg = document.images["sticker"+i];
      if(xImg){
          xImg.ondragstart = function(){return false};
          xImg.onmousedown = function(){catchImg(this)};
          xImg.onmouseup = function(){dropImg(this)};
          xImg.onmouseover = function(){findImg(this)};
      }
     }
  }
  notimeout = false;
  setTimeout('moveSticker()', 2*1000); //2 secondes
}

function catchImg(theImg, e){
  if(!e) e = event;
  theDiv = theImg.parentNode;
  theDiv.style.cursor = "hand";
  theDiv.onmousemove = moveImg;
  stickHotX = e.x - stickerCurX;
  stickHotY = e.y - stickerCurY;
  return false;
}
function moveImg(e){
  if(!e) e = event;
  stickerX = e.x - stickHotX ;
  stickerY = e.y - stickHotY ;
  if(notimeout){
     setTimeout('moveSticker()', 20);
  }
}
function dropImg(theImg, e){
  if(!e) e = event;
  theDiv = theImg.parentNode;
  theDiv.onmousemove = null;
window.status = theImg.name;
  theImg.parentNode.style.cursor = "auto";
stickerVY += 10;
}

function findImg(theImg){
  window.status = theImg.name;
  theImg.parentNode.style.cursor = "hand";
}

//   window.onLoad=initSticker();
//   window.onresize=onResize();

function StickerPerso(opacity, width, height, dest){
   var flash_mode, w;
   w = width - 78;
   document.write('
<table border="0" cellspacing="0" cellpadding="0">----, </td>, , [closeSticker() ]
</td></tr><tr><td>');
    document.write(''+dest+'');
   document.write("</td></tr></table>
");
   initSticker(width, height);
}

StickerPerso(100, 250, 250, " ");

/* (les valeur 100,250,250 faut les garder apparement, et les antislashs aussi, sinon ,, marche plus) */
function choix(){
var site = document.formSaisie.champurl.value
document.getElementById("ifram").src = site
}
-->
</script>
</head>
<!-- ---------------  DEBUT du BODY ------------------------------------------- -->

<form action='javascript:top.location.href(champurl.value)' onsubmit="choix()"  method="get" name="formSaisie">

</form>

<!-- ------------- Fin du BODY -------------------------- -->
</html>
3
cs_bultez Messages postés 13615 Date d'inscription jeudi 13 février 2003 Statut Membre Dernière intervention 15 octobre 2013 30
2 avril 2007 à 14:56
Bonjour,

    je suppute que mypopup contient un windows.open
    il y a toutes les chances que le 3ème paramètre passé ne
        corresponde à l'attente de la fonction. ce doit être les
       caractèritiques du pop-up ( hauteur, largeur, position ...
       du style "width=100px,resizable=no,..."
       donc un n'a rien à faire là.




mypopup(100, 200, 200, "width=600,height=200");


mais ça dépend de mypopup ?       car curieux les 3 valeurs ( 100,200,200... )
<hr />


Cordialement                Bul         [mon Site]         [M'écrire]



<hr />
0
freddyoneone Messages postés 9 Date d'inscription samedi 27 novembre 2004 Statut Membre Dernière intervention 10 avril 2007
2 avril 2007 à 15:20
merci beaucoup pour ta reponse, ca va m 'eclairé un peu
a vrai dire c'est un exemple que j'ai trouvé , et je travail dessus pour apprendre

bon, j'ai avancé un peu,en fait, faut faire un "document.write"
donc ca, ca fonctione , mais je comprend pas pourquoi cela fonctionne et pas autre chose !
'+alert('cela fonctionne')+'


 document.write('');

en fait,ce que je voudrais c'est un truc du style '+document.formSaisie.champurl.value+', mais celle la ne marche pas


et je ne connais pas la bonne syntaxe pour ca
en tout cas merci de ta reponse.
0
cs_bultez Messages postés 13615 Date d'inscription jeudi 13 février 2003 Statut Membre Dernière intervention 15 octobre 2013 30
2 avril 2007 à 15:38
Bonjour,

un document.write écrit ce qu'il y a entre ()
un alert affiche ce qu'il y a entre ()

faire un document.write d'un alert ça ne va pas lui plaire
( à moins de définir une function alert qui fasse un return "ça baigne" )

document.write("exemple");
alert('ça baigne");

ou document.write("exemple, ça baigne");

document.write('');

ça devrait le faire. mais attention au document.write : si la page a été totalement
interprétée ( si on appelle ce document.write sur un evênement style onclick
par exemple ), la page va être effacée.




<hr />



Cordialement                Bul         [mon Site]     [M'écrire]



<hr />
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
freddyoneone Messages postés 9 Date d'inscription samedi 27 novembre 2004 Statut Membre Dernière intervention 10 avril 2007
2 avril 2007 à 15:57
re bonjour,

merci pour les precision, (document.write  et l'Alert)

mais cela ne marche pas
document.write('document.formSaisie.champurl.value+'" width="700" height="600" frameborder="0" border="0" marginwidth="0" marginheight="0" scrolling="no">');

donc la 1er solution etait de garder l'original :
ICI       (mypopup = StickerPerso)

cela me convenait, sauf que j'arrive pas a mettre autre chose qu une page html dedans
et  je voudrais une variable , si je dis pas de betise,

la meilleur solution pour moi est d'avoir ca :

document.write('');

et remplacer "mapage.htm" par une variable,,, mais je ne sais pas si cela est possible !

excuse pour les explications , je ne suis pas doué.
0
freddyoneone Messages postés 9 Date d'inscription samedi 27 novembre 2004 Statut Membre Dernière intervention 10 avril 2007
2 avril 2007 à 16:03
oups,, j ai fait une erreur !

c'est ca que je voudrais garder

mypopup(100, 250, 250, "");

et remplacer "mapage.htm" par une variable,,, mais je ne sais pas si cela est possible !
0
cs_bultez Messages postés 13615 Date d'inscription jeudi 13 février 2003 Statut Membre Dernière intervention 15 octobre 2013 30
2 avril 2007 à 16:09
Avec |
|
et mieux :
télécharger
|

----

FireFox,
regarder la "console d'erreurs",
mon Site] [M'écrire]<hr />
0
freddyoneone Messages postés 9 Date d'inscription samedi 27 novembre 2004 Statut Membre Dernière intervention 10 avril 2007
2 avril 2007 à 17:17
oui, excuse moi,,, quand je dis ca marche pas c'est que la popup ne s'affiche plus du tout !

en fait j'avais mis le formulaire au dessus dans le 1er post. mais j'avais oublié qq chose , desolé

je suis vraiment pas doué ! lol

je remets ca ici comme ca marche chez moi :

<form action= 'javascript:top.location.href(formSaisie.champurl.value)' onsubmit="return valider()"  method="get" name="formSaisie">
   
   
  
  </form> 

on tape une adresse dans le champ texte,  et je recupere par l'ID "champurl" qui s'incrit dans "value"
si je dis pas de betise,

mais cela ouvre dans une page entiere et il faudrait que je l'ouvre dans le popup

mypopup(100, 250, 250, "  ADRESSE DU champurl       " width ="250" height="250" frameborder="0" border="0" marginwidth="0" marginheight="0" scrolling="no">");

top.location.href(formSaisie.champurl.value) ouvre dans une page entiere , ca j ai compris,
mais, comment l'integrer dans le popup , là je bloque !

es ce que j'ai mis ce qu'il fallait comme infos ? 

 (je ne vous dirais jamais assez merci !)
0
cs_bultez Messages postés 13615 Date d'inscription jeudi 13 février 2003 Statut Membre Dernière intervention 15 octobre 2013 30
2 avril 2007 à 18:28
<script type= "text/javascript">
function popup()
{
    window.open(document.formSaisie.champurl.value,'','');   
    ou

    window.open(document.getElementById("champurl").value,'','');   


}
</script>

<form action ="javascript:popup();"  method="get" name="formSaisie"
    onsubmit="return valider();" >
  
 
</form>

ou
mettre la page dans l'action  du formulaire.
    dans valider() : document.formSaisie.action=
document.formSaisie.champurl.value
    <form action=""... >

ou
location.href=
document.formSaisie.champurl.value     directement en javascript


ou...



<hr />



Cordialement        Bul     [mon Site]     [M'écrire]



<hr />
0
freddyoneone Messages postés 9 Date d'inscription samedi 27 novembre 2004 Statut Membre Dernière intervention 10 avril 2007
2 avril 2007 à 19:04
ah, ok.... je commence a y voir plus clair,(à force de regarder toujours la meme chose on devient aveugle) je vais essayer tous ca.... et je te tiens au courant !

merci de m'avoir mis sur la voie Bultez, et surtout pour ta patience, car cela doit pas etre tres captivant pour toi ce genre de question. 

Merci beaucoup !
0
yousfane Messages postés 243 Date d'inscription vendredi 24 novembre 2006 Statut Membre Dernière intervention 21 décembre 2007 2
2 avril 2007 à 23:55
Salut
j'ai un code mais il ne marche que sur IE le voici

<form name="formSaisie" onSubmit="ouvre()">

</form>
<script langage="javascript">
function ouvre(){
source = document.formSaisie.text.value
wi=open('','iframe','weigth=toolbar=no,scrollbars=no,resizable=yes, width=250, height=250');
wi.document.write('');
}
</script>
0
cs_bultez Messages postés 13615 Date d'inscription jeudi 13 février 2003 Statut Membre Dernière intervention 15 octobre 2013 30
3 avril 2007 à 08:03
pour cet acharnement à vouloir mettre un iframe partout ?
ça sert à quoi ?
ouvres directement source ( dans le 1er paramètre de window.open )
<hr />


Cordialement    Bul     [mon Site]     [M'écrire]



<hr />
0
yousfane Messages postés 243 Date d'inscription vendredi 24 novembre 2006 Statut Membre Dernière intervention 21 décembre 2007 2
3 avril 2007 à 15:51
Salut
oui [auteurdetail.aspx?ID=51635 bultez] mais j'ai cru que [auteurdetail.aspx?ID=389872 freddyoneone] a voulu ouvrire une popup qui contient une iframe si c'est pas ce qui'il veut voici le code

<form name="formSaisie" onSubmit="ouvre()">

</form>
<script langage="javascript">
function ouvre(){
source = document.formSaisie.text.value
open(source,'iframe','weigth=toolbar=no,scrollbars=no,resizable=yes, width=250, height=250');
}
</script>
0
freddyoneone Messages postés 9 Date d'inscription samedi 27 novembre 2004 Statut Membre Dernière intervention 10 avril 2007
7 avril 2007 à 16:07
Bonjour, merci a vous deux pour me donner des soluc, et excusez moi du retard pour repondre, ( si je vous disait combien de temps j'ai passé la dessus, ca vous ferait rire).

Pour repondre a Bultez, c'est vrai que les iframe c'est pas top, mais dans certain cas
ca peut etre utile , enfin je pense, car dans l'exemple du "StickerPopup" ca marche,avec effet du popup,c'est aussi ce qui m'interresse.
alors si on peut se passer de l'iframe, ok,  mais je ne sais pas comment. (si il existe une solution miracle je suis preneur).

c'est a dire un popup dans le meme genre qu' ICI    

J'ai essayé ta soluc Yousfane, mais j'ai le probleme que cela s'ouvre dans une New window, et plus dans le popup, j'ai essayé d'adapter un peu, mais j'ai pas passé assez de temps la dessus (comme je suis pas un expeert)

mais je crois que j'ai pas été assez clair, donc je re mets carrement tout le code qui marche chez moi,  je peux pas faire mieux comme explication..()


<hr />



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns= "http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>essai</title><!-- ------------------- debut du CSS ------------------------------ -->
<style type="text/css">
<!--
body {
position:absolute; left: 50%; top: 5px; width: 760px;
height: 100%; margin-left: -590px; margin-top: 0; border: 1px solid #999;
background-color: #666;
}

.Pagecadencer-css {
 font-family: "Times New Roman", Times, serif;
 font-size: 9px;
 font-style: italic;
 color: #CCCCCC;
}
.style3 {
 color: #99CCFF;
 font-family: Arial, Helvetica, sans-serif;
 font-weight: bold;
 font-size: 16px;
 font-style: italic;
}
.style8 {font-size: 30px}
.style9 {color: #FFFFFF}
.style10 {font-family: "Times New Roman", Times, serif; font-size: 12px;}
.style11 {color: #999999; font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: 16px; font-style: italic; }
.style12 {color: #333333}

#bloc1  {position:absolute; left: 0px; top: 50px; width: 700px; height: 200px; margin-left: 0px; margin-top: 10px;  background-color: #893258; padding-left: 15px; padding-right: 55px; padding-top: 5px;}

#bloc2  {position:absolute; left: 5px; top: 280px; width: 780px; height: 100%; margin-left: 10px; margin-top: 0;  background-color: #523258; padding-left: 5px; padding-right: 5px; padding-top: 5px; padding-bottom: 5px;  }

-->
</style>
<!-- ------------------------ JAVASCRIPT ------------- -->
<SCRIPT LANGUAGE='Javascript'>
window.moveTo(0,0)
window.resizeTo(screen.width,screen.height)

<!--
var stickerX=0, stickerY=0;
var stickerVX=0.0, stickerVY=0.0;
var stickerAX=0.0, stickerAY=0.0;
var stickerCurX=1280, stickerCurY=-800;
var stickerWidth, stickerHeight;
var sticker_closed=true;
var stickHotX, stickHotY;
var notimeout = false;
var isIE6 = document.all && document.getElementById ? true : false;
var isNS6 = ! isIE6 && document.getElementById ? true : false;
var win_w, win_h;

function closeSticker(){
   sticker_closed = true;
   stickerX = -(stickerWidth+1000);
   moveSticker();
}

function initStickerPos(){
   var x, y;
    var layer = document.getElementById ('pub_perso');
y = -(stickerHeight+500);
x = -(stickerWidth+10);
   stickerCurX=x;
   stickerCurY=y;
     if (isIE6) {
          layer.style.pixelLeft = x;
          layer.style.pixelTop = y;
   }
     else if (isNS6) {
          layer.style.left = x+'px';
          layer.style.pixelTop = y+'py';
   }
}

function updateStickerTarget(){
   if(sticker_closed) return;
stickerY = 100;
if (isIE6) {
stickerX = document.body.clientWidth + document.body.scrollLeft;
}
else {
stickerX  = window.pageXOffset;
}
stickerX -= (stickerWidth+370);
   stickerVY += 10;
}
function onResize(){
   updateStickerTarget();
   notimeout = false;
   setTimeout('moveSticker()', 20);
}

function accelSticker(x, y){
   var dx, dy;
   dx= stickerX - x;
   dy= stickerY - y;
      stickerAX  = dx / 60;
      stickerAY  = dy / 60;
}

function moveSticker(){
   var x, y, ax, ay;
    var layer = document.getElementById ('pub_perso');
   accelSticker(stickerCurX, stickerCurY);
   stickerVX*=0.92;
   stickerVY*=0.92;
       stickerVX += stickerAX;
   stickerVY += stickerAY;
   stickerCurX+=stickerVX ;
   stickerCurY+=stickerVY ;
   x = Math.round(stickerCurX);
   y = Math.round(stickerCurY);
     if (isIE6) {
          layer.style.pixelLeft = x;
          layer.style.pixelTop = y;
   }
     else if (isNS6) {
          layer.style.left = x+'px';
          layer.style.pixelTop = y+'py';
   }
   if(x stickerX && y stickerY && stickerVX < 1 && stickerVY < 1){
      notimeout = true;
      saveSize();
        setTimeout('checkSize()', 1000);
   }
   else{
      notimeout = false;
        setTimeout('moveSticker()', 20);
   }
}
function saveSize(){
   if(isIE6){
      win_h = document.body.clientHeight;
      win_w = document.body.clientWidth;
   }
}

function checkSize(){
   if(notimeout == false) return;
   if(isIE6){
      if(win_w != document.body.clientWidth || win_h !=document.body.clientHeight)
         onResize();
      else
         setTimeout('checkSize()', 1000);
   }
}

function initSticker(width, height){
  sticker_closed=false;
  stickerWidth = width;
  stickerHeight = height;
  initStickerPos();
  updateStickerTarget();
  if(isIE6){
     for(i=1;i<=3;i++){
          xImg = document.images["sticker"+i];
      if(xImg){
          xImg.ondragstart = function(){return false};
          xImg.onmousedown = function(){catchImg(this)};
          xImg.onmouseup = function(){dropImg(this)};
          xImg.onmouseover = function(){findImg(this)};
      }
     }
  }
  notimeout = false;
  setTimeout('moveSticker()', 2*1000); //2 secondes
}

function catchImg(theImg, e){
  if(!e) e = event;
  theDiv = theImg.parentNode;
  theDiv.style.cursor = "hand";
  theDiv.onmousemove = moveImg;
  stickHotX = e.x - stickerCurX;
  stickHotY = e.y - stickerCurY;
  return false;
}
function moveImg(e){
  if(!e) e = event;
  stickerX = e.x - stickHotX ;
  stickerY = e.y - stickHotY ;
  if(notimeout){
     setTimeout('moveSticker()', 20);
  }
}
function dropImg(theImg, e){
  if(!e) e = event;
  theDiv = theImg.parentNode;
  theDiv.onmousemove = null;
window.status = theImg.name;
  theImg.parentNode.style.cursor = "auto";
stickerVY += 10;
}

function findImg(theImg){
  window.status = theImg.name;
  theImg.parentNode.style.cursor = "hand";
}

//   window.onLoad=initSticker();
//   window.onresize=onResize();

function StickerPerso(opacity, width, height, dest){
   var flash_mode, w;
   w = width - 78;
   document.write('
<table border="0" cellspacing="0" cellpadding="0">----, </td>, , [javascript:closeSticker() ]
</td></tr><tr><td>');
    document.write(''+dest+'');
   document.write("</td></tr></table>
");
   initSticker(width, height);
}

StickerPerso(100, 250, 250, " ICI_mesPages.htm ou formSaisie.champurl.value   " width ="250" height="250" frameborder="0" border="0" marginwidth="0" marginheight="0" scrolling="no"> ");

/* (les valeur 100,250,250 faut les garder apparement, et les antislashs aussi, sinon ,, marche plus) */
-->
</script>
</head>
<!-- ---------------  DEBUT du BODY ------------------------------------------- -->

<form action ='javascript:top.location.href(formSaisie.champurl.value)' onsubmit="return valider()"  method="get" name="formSaisie">
http://www.ADRESSE_PAR_DEFAUT.com"/>

</form>

<!-- ------------- Fin du BODY -------------------------- -->
</html>

<hr />
Voila , j'arrive pas a afficher plusieurs adresse selon mon choix, dans le popup,

j'aimerais comprendre comment on fait ca ! ... mettre une variable dans l' iframe venant du javascript. (un truc du genre '+formSaisie.champurl.value+', mais ca marche pas...
0
yousfane Messages postés 243 Date d'inscription vendredi 24 novembre 2006 Statut Membre Dernière intervention 21 décembre 2007 2
7 avril 2007 à 21:21
Salut
Désolé mais je n'ai pas compris ce que tu veux exactement
0
freddyoneone Messages postés 9 Date d'inscription samedi 27 novembre 2004 Statut Membre Dernière intervention 10 avril 2007
9 avril 2007 à 19:43
bonjour yousfane, et merci de tes reponses,


en fait, ca , ca fonctione, mapage.html s'affiche, donc parfait ;



StickerPerso(100, 250, 250, "maPage.htm   " width= "250" height="250"
frameborder="0" border="0" marginwidth="0" marginheight="0" scrolling="no">");




et moi je voudrais pouvoir afficher plusieurs pages sous forme d'adresse(http://www.site.com/page1.html/) au choix de l'utilisateur,


donc j'ai essayé ca , et ca ne fonctionne pas , et je ne comprend pas pourquoi !



StickerPerso(100, 250, 250, "'+formSaisie.champurl.value+'      " width ="250" height="250"
frameborder="0" border="0" marginwidth="0" marginheight="0" scrolling="no">");




et donc là, je recupere le champ ID du formulaire, c'est a dire, ID="champurl" ,
par le "formSaisie.champurl.value" , mais impossible de le mettre dans le "StickerPerso"


je ne connais pas la bonne syntaxe, ou alors peut etre que c'est carrement impossible !
c'est pour cela que je fais appel a vos lumieres.

merci.
0
freddyoneone Messages postés 9 Date d'inscription samedi 27 novembre 2004 Statut Membre Dernière intervention 10 avril 2007
10 avril 2007 à 01:18
Vraiment Merci a toi Yousfane, c'est exactement ce que je voulais, ca marche tres bien.

j'aurais pas trouver sans toi, et merci a bultez aussi !

fallait donc dans ce cas , creer un nouvelle ID [= 'ifram'] dans le popup, et le recuperer par document.getElementById("ifram").src , c'est ce que je ne voyais pas,
et pas l'inserer directement dans [src ="] .

manquait juste l'appel du SRC , en fin de compte, maintenant j'ai compris.
ca me servira pour l'avenir.

Un Grand merci pour votre aide et a bientot

Probleme resolu !
0
yousfane Messages postés 243 Date d'inscription vendredi 24 novembre 2006 Statut Membre Dernière intervention 21 décembre 2007 2
10 avril 2007 à 13:33
De rien
0
Rejoignez-nous