Jump to content

ryanyoungsma

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Contact Methods

  • AIM
    ryanyoungsma

Profile Information

  • Gender
    Male
  • Location
    Indialantic, FL

ryanyoungsma's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. 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]
  2. 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?
  3. Does anyone have any thoughts on what could be causing this?
  4. Hello All, running into a situation that I have not seen before. I have been seeing in multiple areas of my application that the response received from the server has 2 JSON responses in it. Here is a sample function: private function getCatalogItems(){ $start = ($_REQUEST["start"] == null)? 0 : $_REQUEST["start"]; $count = ($_REQUEST["limit"] == null)? 20 : $_REQUEST["limit"]; $q = "SELECT c.`id`, c.`catalog_number`, c.`long_description`, CONCAT(c.`catalog_number`, ' - ', c.`long_description`) AS `display` FROM catalog c"; if(!empty($_REQUEST['query'])){ $q .= " WHERE c.`catalog_number` LIKE '%".$_POST['query']."%'"; } $q .= " ORDER BY c.`catalog_number` ASC LIMIT ".$start.",".$count; $rs = $this->db->get_results($q); $total = $this->db->num_rows; $buff = '{"total":"'.$total.'","data":'.json_encode($rs).'}'; $this->c->returnJSON($buff); } The "returnJSON" function looks like this. public function returnJSON($json){ $contentType = "application/json; charset=utf-8"; header("Content-Type: {$contentType}"); header("Content-Size: " . strlen($json)); echo $json; } As you can see this simply sets the headers of the response. It has been a real head scratcher. Anyone come across something like this before?
  5. are you looking to set a base href? <base href="http://www.yourdomain.com/" />
  6. From what I am reading you want the script.php page to write out the value and post it to the page each time, versus display the final results after the code is executed. I do not believe that PHP works like this. All PHP code is executed on the server first then the document is generated. I am thinking that you would need to use JavaScript and AJAX to perform the loop so that at each response you can update the page.
  7. When I was learning JavaScript/AJAX I found it helpful to use a library like http://www.prototypejs.org/. There are others, but was the first one I learned. It provides a few methods to easily execute an AJAX request. Yes there are others like JQuery and so on, but this was the one I learned on. Just a helpful hint.
  8. Thanks for the quick response.  Would I put this code in the actions=" " section of the code or reference the code in the actions section as separate PHP file?  I am thinking the later is the correct course of action, but not sure. so it would be like <form id="form1" name="form1" method="post" target="_blank" action="url.php"> Thanks again. 
  9. Hi All, New to this forum, and was wondering of someone could point me in the right direction.  I a large number of pdf files out on a server that I want customers to be able to get to without listing them all out.  There are different documents based on a specific number, year, type, and dataset.  The document url can be finished by pulling the data below.  For example www.mywebsiteexample.com\cy\pnc\annual\mda12345.pdf Is PHP the correct application to write this in or would it be better suited for something else?  If PHP is the right app, then any idea what the code might look like or a source when I can research it more?  Thank you for all your help in advance! Ryan [code] <form id="form1" name="form1" method="post" action="">   <label>Year   <select name="select" tabindex="1">     <option value="CY">2005</option>     <option value="PY">2004</option>   </select>   </label>   <p>     <label>Product     <select name="select2" tabindex="2"> <option value="Property & Casualty">PNC</option> <option value="Life, Accident & Health">LAH</option>     </select>     </label>   </p>     <p>     <label>Statement     <select name="select2" tabindex="3"> <option value="annual">Annual</option> <option value="quarterly" selected="selected">Quarterly</option>     </select>     </label>   </p>   <p>     <label>Document     <select name="select2" tabindex="3"> <option value="MDA">Management Discussion &amp; Analysis</option>     </select>     </label>   </p>   <p>     <label>Company Code     <input type="text" name="textfield" tabindex="4" />     </label>   </p>   <p>     <label>     <input type="submit" name="Submit" value="Submit" tabindex="5" />     </label>   </p> </form> [/code]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.