1.0.45 • Published 11 months ago

px-autocomplete-jquery v1.0.45

Weekly downloads
37
License
MIT
Repository
github
Last release
11 months ago

description

Allows to filter selective data and add new data. It works like a SELECT object but provides filtering with a JSON data block. Allows you to perform live search from database with AJAX url. If the written data is not in the data block, it marks it as new, so it provides an opportunity to define it like an INPUT object.

description TR

Seçimli verileri süzmeye ve yeni verileri eklemeye olanak tanır. SELECT nesnesi gibi çalışır ancak JSON data bloğu ile filtreleme olanağı sağlar. AJAX url ile veritabanından canlı arama yapmanıza imkan verir. Yazılan veri eğer data bloğunda yoksa yeni olduğunu işaretler bu sayene INPUT nesnesi gibi yani tanımlama imkanı sağlar.

install

npm i jquery npm i px-autocomplete-jquery

html

\<div id="objectid">\</div> or \<div id="objectid" data-name="requestname" data-result-max-height="300" data-style="" data-placeholder="" data-new-text="new" data-registered-text="registered" data-alert-text="No record available!">\</div> or \<select id="objectid" name="city"> \<option valeu="01">Adana\</option> \<option valeu="06" selected="true">Ankara\</option> \<option valeu="16">Bursa\</option> \</select>

options attributes

data-name="requestname" data-result-max-height="300" data-style="" data-placeholder="" data-new-text="new" data-registered-text="registered" data-alert-text="No record available!"

css

@import "~px-autocomplete-jquery/px-autocomplete.css";

javascript - jquery

require('px-autocomplete-jquery');

init

$("#objectid").pxautocomplete({ jsondata: { val: '1', image: null, text: 'data 1' }, ..., ajaxpage: 'api/searchpage', name: "requestname", selected_value: null, selected_text: null, maxheight: '100', placeholder: '', registered_text: 'registered', image_title: 'Show Image', new_text: 'new', alert_text: 'No record available!', style: "background:#fff; color:#444", class: "extraclass default null", focuscallback: function(e){}, callback : function(){} });

using php with ajax

URL: http://localhost/api/searchpage PHP CODE EXAMPLE: $text = $_POST"text"; ... "your php codes" ... $resultdata = ['val' => 1, 'text' => 'data 1', 'image' => 'imageurl or null or undefined', ...]; echo json_encode($resultdata);

set data:

$("#objectid").pxautocomplete("set", { val: '16', image: 'http://127.0.0.1:8000/images/logo.png', text: 'Bursa' });

set new json data:

$("#objectid").pxautocomplete("setjsondata", { val: '16', image: 'http://127.0.0.1:8000/images/logo.png', text: 'Bursa' }, ... );

view:

1.

alt text

2.

alt text

3.

alt text

4.

alt text

5.

alt text

1.0.44

11 months ago

1.0.43

11 months ago

1.0.45

11 months ago

1.0.42

1 year ago

1.0.39

1 year ago

1.0.38

1 year ago

1.0.40

1 year ago

1.0.41

1 year ago

1.0.37

1 year ago

1.0.36

1 year ago

1.0.33

2 years ago

1.0.32

2 years ago

1.0.31

2 years ago

1.0.35

2 years ago

1.0.34

2 years ago

1.0.29

2 years ago

1.0.28

2 years ago

1.0.27

2 years ago

1.0.30

2 years ago

1.0.26

3 years ago

1.0.25

3 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.24

3 years ago

1.0.23

3 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago