ryanyoungsma Posted March 1, 2011 Share Posted March 1, 2011 How can I receive a response from the server with JSON data, when the function that retrieves the data and returns it to the browser has been completely commented out? I am making an AJAX request for JSON formatted data and for some reason it returns a response when it shouldn't as there is no function? Quote Link to comment Share on other sites More sharing options...
trq Posted March 1, 2011 Share Posted March 1, 2011 How can I receive a response from the server with JSON data, when the function that retrieves the data and returns it to the browser has been completely commented out? You can't. I am making an AJAX request for JSON formatted data and for some reason it returns a response when it shouldn't as there is no function? What does the response contain? Quote Link to comment Share on other sites More sharing options...
ryanyoungsma Posted March 1, 2011 Author Share Posted March 1, 2011 Can a returned response be cached in some way that I am not thinking of? I even added no-cache in the headers of the response. The response is data coming from a database table that used to be generated from the function I commented out. Not only is it there once, but it is in the response twice. Here is the response I am getting. If you copy it to JSONLINT you will see that it is duplicated. Then at the very bottom you see where it errors on the function call, the one that is supposed to generate that data. {"total":"2251","data":[{"id":"1863","catalog_number":"22889","long_description":"Chicago Mixing Faucet 930, Chrome Finish, Vacuum Breaker, Wrist Blade Handles","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2217","catalog_number":"910006FH","long_description":"Labconco Fume Hood, Project #910006. Items: [1]-2247400, [1]-S10815A6, [1]-9851800","type":"CAT","last_changed":null,"status":"Pending"},{"id":"685","catalog_number":"999998","long_description":"GENERIC PART #","type":"CAT","last_changed":null,"status":"Active"},{"id":"397","catalog_number":"999999","long_description":"","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2600","catalog_number":"A042422-001","long_description":"Apron, With 1 Drawer, 24\" W x 22\" D x 4.5\" H","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2295","catalog_number":"A043622-001","long_description":"Apron, With 1 Drawer, 36\" W x 22\" D x 4.5\" H","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2623","catalog_number":"AAE003GR","long_description":"Metal Hood, 10\" Diameter ","type":"CAT","last_changed":null,"status":""},{"id":"2624","catalog_number":"AAE652CR","long_description":"7.5cm (3\") Arm, Suspended Column Mount, 3 Position","type":"CAT","last_changed":null,"status":""},{"id":"2625","catalog_number":"AAE802EW","long_description":"Ceiling Mounting Box, 40\" length","type":"CAT","last_changed":null,"status":""},{"id":"2296","catalog_number":"AAM111BN-001","long_description":"Modrack, 24\"x30\" Epoxy Pegboard with Integral Drip Trough","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2364","catalog_number":"AAM231BN","long_description":"Modrack, 30\"W x 36\"H, Stainless Steel, [40] Pegs, WM Bracket, 4\" Integral Drip Trough.","type":"CAT","last_changed":"2011-02-27","status":"Active"},{"id":"2297","catalog_number":"AAM341BN-001","long_description":"Modrack, 36\"x30\" High Epoxy Pegboard with Integral Drip Trough","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2298","catalog_number":"AAM341BN-002","long_description":"Modrack, 48\"x30\" High Epoxy Pegboard with Integral Drip Trough","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2650","catalog_number":"ACCABLE001","long_description":"Adhesive Cable Clip, Package 100","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2394","catalog_number":"ACLTAL2401","long_description":"24\" Talea-HP, High powered LED Light fixture, Pasive infrared vacancy sensor, Black color, 50 Lumens\/ watt.","type":"CAT","last_changed":null,"status":""},{"id":"2395","catalog_number":"ACLTAL3701","long_description":"37\" Talea-HP, High powered LED Light fixture, Pasive infrared vacancy sensor, Black color, 50 Lumens\/ watt.","type":"CAT","last_changed":null,"status":""},{"id":"2396","catalog_number":"ACLTAL4601","long_description":"46\" Talea-HP, High powered LED Light fixture, Pasive infrared vacancy sensor, Black color, 50 Lumens\/ watt.","type":"CAT","last_changed":null,"status":""},{"id":"2409","catalog_number":"ACLTALMNT","long_description":"Talea-HP Light Mounting Bracket, Magnetic","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2398","catalog_number":"ACLTALPWS","long_description":"Power Supply for Talea-HP LED Light","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2482","catalog_number":"ACLVT28","long_description":"Wisteria, VT Series Task Light, 28\"W, T8, 3500K Lamp, Black, 90D Plug","type":"CAT","last_changed":null,"status":""},{"id":"2475","catalog_number":"ACLVT36-UK","long_description":"Wisteria, VT Series Task Light, 36\"W,T8, 3500K Lamp (UK Plug - 240V)","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2672","catalog_number":"ACLVT48","long_description":"Wisteria, VT Series Task Light, 48\"W, T8, 3500K Lamp, Black, 90D Plug","type":"CAT","last_changed":null,"status":""},{"id":"2476","catalog_number":"ACLVT48-UK","long_description":"Wisteria, VT Series Task Light, 48\"W,T8, 3500K Lamp (UK Plug - 240V)","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2397","catalog_number":"ACPPLT001","long_description":"304 Stainless Steel Face Plate, [1] L6-20R (Left Side) & [1] GFCI (Right Side) Cutout, Double Gang, Custom Plate","type":"CAT","last_changed":null,"status":"Pending"},{"id":"496","catalog_number":"ACWS1812","long_description":"18\"L x 12\"D Wall Shelf, Painted","type":"CAT","last_changed":null,"status":"Pending"},{"id":"497","catalog_number":"ACWS2412","long_description":"24\"L x 12\"D Wall Shelf, Painted","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2449","catalog_number":"ACWS3012","long_description":"Painted steel shelf, 30\"x12\"Dp.","type":"CAT","last_changed":null,"status":""},{"id":"498","catalog_number":"ACWS3612","long_description":"36\"L x 12\"D Wall Shelf, Painted","type":"CAT","last_changed":null,"status":"Pending"},{"id":"499","catalog_number":"ACWS4812","long_description":"48\"L x 12\"D Wall Shelf, Painted","type":"CAT","last_changed":null,"status":"Pending"},{"id":"500","catalog_number":"ACWS6012","long_description":"60\"L x 12\"D Wall Shelf, Painted","type":"CAT","last_changed":null,"status":"Pending"}]}{"total":"2251","data":[{"id":"1863","catalog_number":"22889","long_description":"Chicago Mixing Faucet 930, Chrome Finish, Vacuum Breaker, Wrist Blade Handles","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2217","catalog_number":"910006FH","long_description":"Labconco Fume Hood, Project #910006. Items: [1]-2247400, [1]-S10815A6, [1]-9851800","type":"CAT","last_changed":null,"status":"Pending"},{"id":"685","catalog_number":"999998","long_description":"GENERIC PART #","type":"CAT","last_changed":null,"status":"Active"},{"id":"397","catalog_number":"999999","long_description":"","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2600","catalog_number":"A042422-001","long_description":"Apron, With 1 Drawer, 24\" W x 22\" D x 4.5\" H","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2295","catalog_number":"A043622-001","long_description":"Apron, With 1 Drawer, 36\" W x 22\" D x 4.5\" H","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2623","catalog_number":"AAE003GR","long_description":"Metal Hood, 10\" Diameter ","type":"CAT","last_changed":null,"status":""},{"id":"2624","catalog_number":"AAE652CR","long_description":"7.5cm (3\") Arm, Suspended Column Mount, 3 Position","type":"CAT","last_changed":null,"status":""},{"id":"2625","catalog_number":"AAE802EW","long_description":"Ceiling Mounting Box, 40\" length","type":"CAT","last_changed":null,"status":""},{"id":"2296","catalog_number":"AAM111BN-001","long_description":"Modrack, 24\"x30\" Epoxy Pegboard with Integral Drip Trough","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2364","catalog_number":"AAM231BN","long_description":"Modrack, 30\"W x 36\"H, Stainless Steel, [40] Pegs, WM Bracket, 4\" Integral Drip Trough.","type":"CAT","last_changed":"2011-02-27","status":"Active"},{"id":"2297","catalog_number":"AAM341BN-001","long_description":"Modrack, 36\"x30\" High Epoxy Pegboard with Integral Drip Trough","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2298","catalog_number":"AAM341BN-002","long_description":"Modrack, 48\"x30\" High Epoxy Pegboard with Integral Drip Trough","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2650","catalog_number":"ACCABLE001","long_description":"Adhesive Cable Clip, Package 100","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2394","catalog_number":"ACLTAL2401","long_description":"24\" Talea-HP, High powered LED Light fixture, Pasive infrared vacancy sensor, Black color, 50 Lumens\/ watt.","type":"CAT","last_changed":null,"status":""},{"id":"2395","catalog_number":"ACLTAL3701","long_description":"37\" Talea-HP, High powered LED Light fixture, Pasive infrared vacancy sensor, Black color, 50 Lumens\/ watt.","type":"CAT","last_changed":null,"status":""},{"id":"2396","catalog_number":"ACLTAL4601","long_description":"46\" Talea-HP, High powered LED Light fixture, Pasive infrared vacancy sensor, Black color, 50 Lumens\/ watt.","type":"CAT","last_changed":null,"status":""},{"id":"2409","catalog_number":"ACLTALMNT","long_description":"Talea-HP Light Mounting Bracket, Magnetic","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2398","catalog_number":"ACLTALPWS","long_description":"Power Supply for Talea-HP LED Light","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2482","catalog_number":"ACLVT28","long_description":"Wisteria, VT Series Task Light, 28\"W, T8, 3500K Lamp, Black, 90D Plug","type":"CAT","last_changed":null,"status":""},{"id":"2475","catalog_number":"ACLVT36-UK","long_description":"Wisteria, VT Series Task Light, 36\"W,T8, 3500K Lamp (UK Plug - 240V)","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2672","catalog_number":"ACLVT48","long_description":"Wisteria, VT Series Task Light, 48\"W, T8, 3500K Lamp, Black, 90D Plug","type":"CAT","last_changed":null,"status":""},{"id":"2476","catalog_number":"ACLVT48-UK","long_description":"Wisteria, VT Series Task Light, 48\"W,T8, 3500K Lamp (UK Plug - 240V)","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2397","catalog_number":"ACPPLT001","long_description":"304 Stainless Steel Face Plate, [1] L6-20R (Left Side) & [1] GFCI (Right Side) Cutout, Double Gang, Custom Plate","type":"CAT","last_changed":null,"status":"Pending"},{"id":"496","catalog_number":"ACWS1812","long_description":"18\"L x 12\"D Wall Shelf, Painted","type":"CAT","last_changed":null,"status":"Pending"},{"id":"497","catalog_number":"ACWS2412","long_description":"24\"L x 12\"D Wall Shelf, Painted","type":"CAT","last_changed":null,"status":"Pending"},{"id":"2449","catalog_number":"ACWS3012","long_description":"Painted steel shelf, 30\"x12\"Dp.","type":"CAT","last_changed":null,"status":""},{"id":"498","catalog_number":"ACWS3612","long_description":"36\"L x 12\"D Wall Shelf, Painted","type":"CAT","last_changed":null,"status":"Pending"},{"id":"499","catalog_number":"ACWS4812","long_description":"48\"L x 12\"D Wall Shelf, Painted","type":"CAT","last_changed":null,"status":"Pending"},{"id":"500","catalog_number":"ACWS6012","long_description":"60\"L x 12\"D Wall Shelf, Painted","type":"CAT","last_changed":null,"status":"Pending"}]}[color=red][b]<br /> <b>Fatal error</b>: Call to undefined method Catalog::getCatalogItems() in <b>C:\wamp\www\skynet30\php\appRouter\CatalogRouter.php</b> on line <b>22</b><br />[/b][/color] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.