how to autocomplete in custom field by jquery
Posted: Fri Sep 21, 2012 9:43 am
Script URL:
Version of script: 2.3
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
Write your message below:
I want to do a auto complete in custom filed which search the history record to return the data to custom field.
I can do it for the email when user input name it will auto fill in email with js onchange code then call a empcheck.php file search in the mysql hesk_tickets and return the text.
sample code:
my problem are:
1.
but the custom filed is generate by a foreach and switch code, I don't know how to do this, for example when people type in custom7 field (I put department info here) it will auto complete by jquery like demo in below:
http://www.jqueryrain.com/?jpzxv5Id
2.
I have to keep two copy of empcheck.php for it work for both user and admin, one under hesk folder and one under \hesk\admin folder, I tried add the path in the \admin\new_ticket.php when call php file but it can't work.
Version of script: 2.3
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
Write your message below:
I want to do a auto complete in custom filed which search the history record to return the data to custom field.
I can do it for the email when user input name it will auto fill in email with js onchange code then call a empcheck.php file search in the mysql hesk_tickets and return the text.
sample code:
Code: Select all
<td width="80%"><input type="text" name="name" id="name" onchange = "empcheck();" size="40" maxlength="30" value="<?php if (isset($_SESSION['c_name'])) {echo stripslashes(hesk_input($_SESSION['c_name']));} ?>" <?php if (in_array('name',$_SESSION['iserror'])) {echo ' class="isError" ';} ?> /></td>
1.
but the custom filed is generate by a foreach and switch code, I don't know how to do this, for example when people type in custom7 field (I put department info here) it will auto complete by jquery like demo in below:
http://www.jqueryrain.com/?jpzxv5Id
2.
I have to keep two copy of empcheck.php for it work for both user and admin, one under hesk folder and one under \hesk\admin folder, I tried add the path in the \admin\new_ticket.php when call php file but it can't work.