Home >Backend Development >PHP Tutorial >Live search cannot use the syntax of this page to retrieve data into a div?
I have done a live search (assuming search.php) and it will retrieve the data to page a
If there is matching data, it will be printed into the div of page a
The problem is here
Because my search.php will have some jquery operations such as data-
and $.ajax
, etc., which can edit and update the data
So I have added these plug-ins to the a page
For example<script src="http ://code.jquery.com/jquery-1.10.2.min.js"></script>
and the jquery.js plug-in syntax at the bottom of the page (put data-
and $.ajax
, etc. etc)
When the data reaches the div of page a, I operate the jquery syntax on it but it doesn’t work at all!
So I added a plug-in to search.php<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
and my own jquery .js
can be used, but when updating the data, the field values will be completely cleared, that is, after pressing save, the field values will become empty....
But when I enter search.php alone (not on page a) Update data and other operations
The operation is completely normal! It’s completely possible to save data and so on, no problem
So I don’t quite understand how to explain this?
It means that search.php is a completely independent page. Any syntax on page A is completely unavailable
But I am printing to page a...
Then if it is a completely independent page, adding syntax to search.php will be weird (the field value will become empty)!
I have done a live search (assuming search.php) and it will retrieve the data to page a
If there is matching data, it will be printed into the div of page a
The problem is here
Because my search.php will have some jquery operations such as data-
and $.ajax
, etc., which can edit and update the data
So I have added these plug-ins to the a page
For example<script src="http ://code.jquery.com/jquery-1.10.2.min.js"></script>
and the jquery.js plug-in syntax at the bottom of the page (put data-
and $.ajax
, etc. etc)
When the data reaches the div of page a, I operate the jquery syntax on it but it doesn’t work at all!
So I added a plug-in to search.php<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
and my own jquery .js
can be used, but when updating the data, the field values will be completely cleared, that is, after pressing save, the field values will become empty....
But when I enter search.php alone (not on page a) Update data and other operations
The operation is completely normal! It’s completely possible to save data and so on, no problem
So I don’t quite understand how to explain this?
It means that search.php is a completely independent page. Any syntax on page A is completely unavailable
But I am printing to page a...
Then if it is a completely independent page, adding syntax to search.php will be weird (the field value will become empty)!