Probleme d'envoyer des données a partir d'un formulaire
sstesti
Messages postés2Date d'inscriptionmardi 21 avril 2009StatutMembreDernière intervention11 mai 2009
-
11 mai 2009 à 15:34
sstesti
Messages postés2Date d'inscriptionmardi 21 avril 2009StatutMembreDernière intervention11 mai 2009
-
11 mai 2009 à 15:56
bonjour,
mon problème et de comment faire pour envoyer les donnes a un page php
sstesti
Messages postés2Date d'inscriptionmardi 21 avril 2009StatutMembreDernière intervention11 mai 2009 11 mai 2009 à 15:56
bonjour,
voici un code que j'ai récupéré et que je n'arrive pas à adapter
page.html:
<html>
<head>
<script language="javascript" type="text/javascript">
function moveOver()
{
var boxLength = document.choiceForm.choiceBox.length;
var selectedItem = document.choiceForm.available.selectedIndex;
var selectedText = document.choiceForm.available.options[selectedItem].text;
var selectedValue = document.choiceForm.available.options[selectedItem].value;
var i;
var isNew = true;
if (boxLength != 0) {
for (i = 0; i < boxLength; i++) {
thisitem = document.choiceForm.choiceBox.options[i].text;
if (thisitem == selectedText) {
isNew = false;
break;
}
}
}
if (isNew) {
newoption = new Option(selectedText, selectedValue, false, false);
document.choiceForm.choiceBox.options[boxLength] = newoption;
}
document.choiceForm.available.selectedIndex=-1;
}
function removeMe() {
var boxLength = document.choiceForm.choiceBox.length;
arrSelected = new Array();
var count = 0;
for (i = 0; i < boxLength; i++) {
if (document.choiceForm.choiceBox.options[i].selected) {
arrSelected[count] = document.choiceForm.choiceBox.options[i].value;
}
count++;
}
var x;
for (i = 0; i < boxLength; i++) {
for (x = 0; x < arrSelected.length; x++) {
if (document.choiceForm.choiceBox.options[i].value == arrSelected[x]) {
document.choiceForm.choiceBox.options[i] = null;
}
}
boxLength = document.choiceForm.choiceBox.length;
}
}
function saveMe() {
var strValues = "";
var boxLength = document.choiceForm.choiceBox.length;
var count = 0;
if (boxLength != 0) {
for (i = 0; i < boxLength; i++) {
if (count == 0) {
strValues = document.choiceForm.choiceBox.options[i].value;
}
else {
strValues = strValues + "," + document.choiceForm.choiceBox.options[i].value;
}
count++;
}
}
if (strValues.length == 0) {
alert("You have not made any selections");
}
else {
alert("Here are the values you've selected:\r\n" + strValues);
}
}
</script>
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<center>
<form name="choiceForm" method="POST" action="verif.php">
Outils et Langages
de développement :