php - impossible making javascript function and new row -
I am trying to create a function that adds a line but keypress
T / I've been working with "
, '
and it does not matter without it. When I press the button, nothing happens.
/ / Function Endand Lundy Count CounterLundy = 0; var $ newRow; $ (function () {$ ('# ad_lundi'). Click (function () {counterlundy = = 1; $ ('# Namlundi '). Append ($ NewRay) = $ (' & Lt ; Input id = "numlundi '+ counterlundi +'" name = "numlundi [] '+'" type = "text" onblur = "autre ();" onfocus = "enter ();" / & gt; '))
How do I?
Here's the php
& lt; td & gt; Lt; b & gt; Lundy & lt; / b & gt; & lt; / br & gt; & lt ;? php Echo $ date2? & Gt; & lt; div id = "lundicon" & gt; & lt; P id = "add_lundi" class = "plus"> gt; + & lt; / span & gt; & lt; / a & gt; "& Gt; Input In URL =" Atore (); Enter "onfocus =" (); "Size =" 10 "type =" article "id =" progedu "name =" prolonged "onkeypress =" return handover center 2 (e) vent, this, 'work'); "/> & gt; Lt; / TD & gt; & lt; TD & gt; & lt; div id = "prodesclun" & gt; & lt; input type = "text" name = "projdesclundi" onblur = "autre ();" onFocus = "Entry" "Size =" 30 "class" character "id =" projdesclundi "/> Pre> My Javascript function of my static input
// ------- Auto complete Function Handle Center 2 (E, OBJ, Field) {If (E. Kikode == 13 || E. == 13) {if (window.XMLHttpRequest) {// code for IE7 +, Firefox, Chrome, Opera, Safari xmlhttp = New XMLHttpRequest ();} Else {// code for IE6, IE5 xmlhttp = New ActiveXObject ("Microsoft.XMLHTTP"); } Xmlhttp.onreadystatechange = function () {if (xmlhttp.readyState == 4 & xmlhttp.status == 200} {tempArrayInJS = JSON.parse (xmlhttp.responseText); $ ("#clint Lindy"). Val (Temperareiijs [0] ['Kleinam']); $ ("#projedclin"). Val (TempRieIJS [0] ['Prociration']); }} Xmlhttp.open ("GET", "fullclient.php? Q =" + obj.value, true); Xmlhttp.send (); }}
$ ('# numlundi'). On ('keypress', 'input', function (e) {var $ this = $ (this); if (e.keyCode == 13 || E.H. == 13) {if (window.XMLHttpRequest) {// code for IE7 +, Firefox, Chrome, Opera, Safari xmlhttp = New XMLHttpEvive ();} // code for other IEE, IEE XMLPHP = NewActive Object ("Microsoft. XMLHttp");} XMLhttp.onreadystatechange = function () {If (xmlhttp ReadyState == 4 and xmlhttp.status == 200} {tempArrayInJS = JSON.parse (xmlhttp.responseText); if ($ this.attr ('id')! = 'Numlundi') { Var id = $ this $ ("Numlundi,"); $ ("#lLlLundi" + id) .val (tempArrayInJS [0] ['cliName']); $ ("# projdesclundi" + id) .val ( TempArra YInJS [0] ['proDescription']); and {$ ("#clint Lindy"). VaL (tempArrayInJS [0] ['Clunnam']); $ ("#projedclin"). Val (TempRieIJs [0] ] ['Prociration']);}}} Xmlhttp.open ("GET", "fullclient.php? Q =" + $ this.val (), true); xmlhttp.send ();}})
Comments
Post a Comment