Jump to content

Mike Hemeles

Members
  • Posts

    9
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Mike Hemeles's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. I change the join += valeur + "<br>" join = valeur and now it's go well, but the problem now is that when you click two or more times on the submits, the inputs are multiplied so that I want it remains the same even if you always click on, do you know how we do for that?
  2. ok I've wrong with the submit button, now the input appears with the string like this,
  3. thanks, I have tried to do your indications like this, var count = 1; $(function () { $('#submit').click(function () { var met = $('#nom').val(); var metiers = met.split(', '); var join = ""; $.each(metiers, function(index, valeur) { join += valeur + "<br>"; var element = document.createElement("input"); element.setAttribute("type", "text"); element.setAttribute("value", valeur); element.setAttribute("name", "txtbox"+ count); var vals = document.getElementById("inputbox"); vals.appendChild(element); var br = document.createElement("br"); vals.appendChild(br); }); }) }); <div id = "inputbox"> <input type="text" value="A, B, C, D" id="nom"> </div> I don't know where is wrong but the input doesn't appears
  4. I want, to remove the comma and space, and after get one by one the value and set it to an input Text, eg: A, B, C, D so I split this string and it in input Text.
  5. Hello, I want to set of my input text value of a string where I split in advance, so for each array of the string set it of input! I should it like this but the input don't loop. $(function () { $('#submit').click(function () { var met = $('#nom').val(); var metiers = met.split(', '); var join = ""; $.each(metiers, function(index, value) { join += value; $('#input').each(function () { $(this).val(join); }); }); }) }); who can I do so that my input split and have all value of string exploded, thanks
  6. Thanks for your response, It's works perfectly, return (value !== ""); //it was for the end of the loop, but I think it was necessary in fact Thanks, And, is there a way to put an input for each label?
  7. Hello, $(function () { $('#selectliste').change(function () { var l = selectliste.options[selectliste.selectedIndex].innerHTML; var tous = l.split(' '); $.each(tous, function(index, value) { $("#label").html(value) + "<br>"; return ( value !== "" ); }); }) }); here, I want to get the value of my select box which are in string type, after I explode the string in array, the set the value of array in label, But, all worked wonderfully until $("#label").html(value) + "<br>"; which only retrieves the last list of my array. How can I make to recover all the value of my array, thank you!
×
×
  • Create New...