EasyUI Forum
September 14, 2025, 03:38:47 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: URL to php file that populate datagrid ???  (Read 15240 times)
MFS
Newbie
*
Posts: 47



View Profile
« on: December 30, 2015, 12:23:33 AM »

Hello again.
I have one more question about php file locations and urls.
This is part of my code for datagrid:

<table id="ZZOGrid" title="" class="easyui-datagrid" style="auto;height:600px"
url="ZahtjevZaOdsustvoGET.php"
toolbar="#toolbar" pagination="true"
rownumbers="true" fitColumns="true" singleSelect="true" >
<thead>
<tr>
<th field="Broj" width="20">Broj</th>
<th field="STATUS" width="70">Status</th>                     
<th field="TipOdsustvaSifra" width="15">Šifra</th>
<th field="TipOdsustva" width="70">Tip odsustva</th>
<th field="PlaniraniPocetak" width="50">Planirani početak</th>
<th field="PlaniraniKraj" width="50">Planirani kraj</th>
<th field="Obrazlozenje" width="150">Obrazloženje</th>
<th field="RealiZOvanoRadnihDana" width="50">Broj realizovanih dana</th>
<th field="Odluka" width="100">Odluka voditelja</th>
</tr>
</thead>
</table>

My question is next.
This php file ZahtjevZaOdsustvoGET.php for get data for datagrid is on root of project ( PROJECT/ZahtjevZaOdsustvoGET.php ).But if I create new folder under PROJECT, and called GETDATA and put in url next: url="GETDATA/ZahtjevZaOdsustvoGET.php" data grid dosnt populate data from db.
I checked file root using Firebug and other tools, file location and url is file but still dosnt populate grid.
If I put php file back to root of PROJECT, its work fine.

Why and how to fix it?
Thanks.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: December 30, 2015, 09:08:18 AM »

Where is the page that contains the datagrid component? Is it on the root of your project? Please try to visit 'http://xx.com/GETDATA/ZahtjevZaOdsustvoGET.php' on your browser to see if it can be opened properly.
Logged
MFS
Newbie
*
Posts: 47



View Profile
« Reply #2 on: December 30, 2015, 09:19:34 AM »

I can open that php file in browser.URL is correct.Path is ok, php file work fine, but if php file is not on root datagrid is not popuplated.
Why??
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: December 30, 2015, 08:16:23 PM »

Open the develop tool of a browser and switch to the 'network' or 'resource' tab. You will see the request to the server. Is there some error occurred while requesting to the server. Or run the code below on the browser to see what happens.
Code:
$.ajax({
type: 'post',
url: 'GETDATA/ZahtjevZaOdsustvoGET.php',
dataType: 'json',
success: function(data){
console.log(data)
},
error: function(){
console.log('error')
}
});
Logged
MFS
Newbie
*
Posts: 47



View Profile
« Reply #4 on: December 31, 2015, 12:18:16 AM »

You can see it on picture.
10.9.9.29 is my localhost ( XAMPP ).
sqlserver is name of project and root.
ZZO is subfolder in project sqlserver and subfolder is on root.
ZahtjevZaOdsustvoGET.php is php that get data.

IF I remove ZZO and put php file in root, all works great, but I need that php in folder.



Paht is OK.URL is OK.That php file is on that location.




Grid:



Logged
MFS
Newbie
*
Posts: 47



View Profile
« Reply #5 on: January 18, 2016, 05:29:21 AM »

Is there any idea for solution?
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!