Jump to content

Search the Community

Showing results for tags 'coldfusion'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. I worked with PHP for several years, then have worked for the last 2 with Coldfusion. I do the following in coldfusion and tried the same type of thing in PHP, but PHP does not return proper results. Does anyone know how I can make this work in PHP? Any tips/help VERY much appreciated, I an my daughter have a lot of coding work waiting for this answer! Neither one of us can figure this out. Coldfusion example: //in the javascript/jquery section of the page: function getOrders(customerid){ $.get('scripts/orderrequests.cfc?method=getOrders&custid='+customerid, function(data){ document.getElementById('orderdiv').innerHTML = data; } ); } then further down on the page <a href="javascript:getOrders(#customerid#)">Click here to list all of your orders.</a><br> <div id="orderdiv"></div> --------- then, briefly... in scripts/orderrequests.cfc is the coldfusion function that gets the orders out of the database, and returns an entire html table of the orders <cfunction name="getOrders" ...> <cfargument name="custid" required="yes"/> <cfquery.... gets the order info out of db just like any mysql query basically...> <cfsavecontent variable="tableinfox"> <table> <tr><tr><td>#orderid#</td><td>#orderdate#</td></tr></table> </table> </cfsavecontent> <cfreturn tableinfox/> </cfunction> ------------------- The scenario beautifully loads the order data into the div "<div id="orderdiv"></div>" above. Been using this for two years in coldfusion, and I would LOVE to figure out how to do the same scenario in PHP, so I tried.. function getOrders(customerid){ $.get('includes/gettheorders.php?custid='+customerid, function(data){ document.getElementById('orderdiv').innerHTML = data; } ); } <?php echo '<a href="javascript:getOrders('.$customerid.');">Click here to list all of your orders.</a><br /><div id="orderdiv"></div>'; ?> Then, "includes/gettheorders.php" is just a simple php query that loads the orders into a table...outputs it to it's own page, which then should be returned as that "data" in function(data)... and loaded into the div.. "document.getElementById('orderdiv').innerHTML = data;" When I tried this with various code on "gettheorders.php", the best I can do is that, "gettheorders.php" can return ONE number "3" but not "content" like an HTML table full of content.. What do I need to do to make this kind of scenario work in PHP? I obviously want to return more content than just a number. I am so hungry for this answer, you don't even know.. but then you are programmers who have also banged your head against your desk, so I guess you do!
×
×
  • 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.