Bonjour all,
j'arrive pas a trouvé pourquoi mon code ne fonctionne pas ou si y a un code optimisé a mettre, voila en faite j'ai créer mon formulaire avec des champs input : Pseudo, Passe, dep, région, etc...
et je voudrait que si une personne coche grande ou petite fenêtre que sa ouvre soi la page principal soi la page ou se trouve la petite page.
Mon javascript :
1 2 3 4 5
| <script type="text/javascript">
function open_chat(page) {
document.forms['chat'].action = (page);
}
</script> |
Mon From :
<form action="../chat/chat.php" method="post" name="chat" id="chat" onsubmit="this.target = new Date().getMilliseconds(); w = window.open('', this.target, 'scrollbars=no, menubar=no, toolbar=no, resizable=yes, screenX=50, screenY=50, width=800, height=600'); if (w != null && !w.closed) w.focus(); else this.target = '_top'; return(true);">
Et mes Bouton Radio et Submit :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| <td><div align="center"> <span class="Style2"><strong>Ouvrir le Tchat</strong>
:<b>
<label> </label>
</b></span><b>
<label></label>
</b><span class="Style6"><b>
<label>
<input name="chat" type="radio" value="grande-fenetre" checked="checked" onclick="open_chat('../chat/chat.php');"/>
En grande fenêtre </label>
<label>
<input name="chat" type="radio" value="petite-fenetre" onclick="open_chat('../chat/rencontre.php');"/>
En petite fenêtre </label>
</b>
</span></div></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><div align="center">
<label>
<input name="submit" type="submit" class="submit" id='submit' onclick="return open_chat()" value="Accéder au chat" />
</label>
</div></td> |
avec se code sa m'ouvre que la page chat/chat.php ou il me dit erreur undefined.
pour info mon ( onclick="return open_chat() ) c'est un fonction javascript en .js qui vérifie si les case pseudo, région etc... si son bien remplie :
<input name="submit" type="submit" class="submit" id='submit' onclick="return open_chat()" value="Accéder au chat" />
Cordialement Stéphane
Partager