I have just started learning Jquery and I am trying to post and retrieve some data with Ajax. The data that I want to extrapolate are some simple text (no json), more specifically the numbers so I wrote it:
$ Ajax ({url: 'finproj.php', type: 'post', data: 'p =' + devidproj, success: work (as a result) {var lengtebalxkx = Math.floor (100 * result / devidproj is a number, like $ number i tried to add dataType: 'text', but it was not working. Php-file, from which I am trying to recover data, is: & lt ;? Include php ('config.php'); $ Pid = $ _REQUEST ['P']; $ Nieuwgeld = mysql_query ('Select battery, audal, donutijs project from project =' '. $ Pid.' ''); While ($ nieuwebed = mysql_fetch_assoc ($ nieuwgeld)) {$ plusbedrag = $ nieuwebed ['bedrag'] * $ nieuwebed ['aantal']; $ Neuebreadragon = $ neuewebreadragon + $ plusdireg; } If ($ nieuwebedragen <<> 0) {echo $ nieuwebedragen;}? & Gt; php-file works fine
I think I have lost something in a comma or a scripts but I am not able to see it What's wrong with this: I have tried to debug this with alerts, but it did not work
devidproj}
Usage
Data: / P> data: 'p =' + devidproj, / code>
No comments:
Post a Comment