Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

demensions popup

2 réponses
Avatar
jpll
Bonjour,
Les petits élèves de l'école doivent choisir entre différentes affiches. A
partir d'une page unique regroupant toutes les affiches(12), ils peuvent
en ouvrir une dans un popup qui affiche "en grand". (la page appelante en
résumé:)
<SCRIPT LANGUAGE="JavaScript">
function popup(page) {
window.open(page);
}
</SCRIPT>
</head>
<body>
<?php
for($i=1; $i<4; $i++){
print"<A
href=\"javascript:popup('page_image.php?num=$i','nom','toolbar=0,menubar=0,location=0,scrollbars=1,width=470,height=695')\"><img
src=affiche_$i.png width=150 height=225 border=0></A>";
}
?>
.../...
or page_image.php de s'ouvre pas aux dimensions requises. Où me suis je
planté?

Merci
(Firefox 2.0.0.6)

2 réponses

Avatar
SAM
or page_image.php de s'ouvre pas aux dimensions requises. Où me suis je
planté?


Peut-être :

function popup(page,cible,attributs) {
window.open(page,cible,attributs);
}

???

Merci
(Firefox 2.0.0.6)


Attention au bloqueur de popup ou aux préférences
(nvelle fenêtre en onglet)



à mon idée ceci devrait être mieux :


<SCRIPT type="text/javascript">

function popup(page) {
if(typeof(truc)=='undefined' || truc.closed)
truc = window.open(
'',
'',
'toolbar=0,menubar=0,location=0,scrollbars=1,widthG0,heighti5'
);
truc.location = page.href;
truc.focus();
return false;
)
</SCRIPT>
</head>
<body>
<?php
for($i=1; $i<4; $i++){
print(
"<A href='page_image.php?num=$i' target='_blank'
onclick='return pop(this);'>
<img src='affiche_$i.png' width0 height"5 border=0>
</A>
");
}
?>

Avatar
jpll
Le Wed, 03 Oct 2007 20:22:58 +0200, SAM a écrit:

Attention au bloqueur de popup ou aux préférences
(nvelle fenêtre en onglet)



à mon idée ceci devrait être mieux :


<SCRIPT type="text/javascript">

function popup(page) {
if(typeof(truc)=='undefined' || truc.closed)
truc = window.open(
'',
'',
'toolbar=0,menubar=0,location=0,scrollbars=1,widthG0,heighti5'
);
truc.location = page.href;
truc.focus();
return false;
)
</SCRIPT>
</head>
<body>
<?php
for($i=1; $i<4; $i++){
print(
"<A href='page_image.php?num=$i' target='_blank'
onclick='return pop(this);'>
<img src='affiche_$i.png' width0 height"5 border=0>
</A>
");
}
?>


Oui effectivement, Merci.