javascript - adding new field to to my html page using JS and checking for auto complete in .XML.PHP file -



javascript - adding new field to to my html page using JS and checking for auto complete in .XML.PHP file -

want add together 1 more auto-complete input field have no ides how it. adding new field to html page using js , checking auto finish in .xml.php file

this .js file

(function(){ var window=window, document=document, scan=gui.app.scan, sys=gui.system, u=gui.util, d=gui.dom, e=gui.event, w=gui.widget, form, formname='gblform-unit', autos={}, reqd={ fields:['unitid'], types:{ 'unitid':'alphanum' } }; /** * set field required if exists * @private * @param {string} id id of field * @returns {void} */ function setrequired(id){ if (d.get(id)){ reqd.fields.push(id); } }

handles onload event window

function onload(){ if (scan.enable_javascript){ if (d.get('#'+ formname)){ setrequired('unitid'); form=new u.formsubmit(formname, reqd, ws.error.getformerror); form.registerscanningfield('unitid'); form.registerbutton([ { id:'gblbtn-submit', type:'submit' } ]); } } } e.add(window, 'load', onload); }()); this .xml.php page <?php seek { $unitid=ws::scrub(@$_get['unitid'], 'alphanum'); $xml = new wsresultdocument(); $data = $xml->getnodeset('data'); if ($unitid){ $unit = wsmodel::execsp('getunit', array('data' => $unitid)); if (!sizeof($unit)){ throw new userexception('unit_value_invalid', $unitid); } $groups = array( array( 'column' => 'unmt_serial', 'table' => 'unmt', 'nodename' => 'unit', ), array( 'column' => 'utdt_label', 'table' => 'utdt', 'groupname' => 'values', 'nodename' => 'value', ), ); $data->addnodeset(wsresult::groupednodeset($unit, $groups, null, false)); } } catch(exception $e){ wserror::logexception($e); $xml = wserror::exceptiontoresult($e); } homecoming $xml; ?>

javascript php xml

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -