sam67 Posted May 8, 2017 Share Posted May 8, 2017 Hi I'm trying to find out 2 things, 1) how to pass a button value that comes from mysqli while loop to javascript then on to Ajax script. 2) how to pass a php array on to javascript and then onto the Ajax script. I will be really grateful if anyone could help. many thanks sam Link to comment Share on other sites More sharing options...
Larry Posted May 9, 2017 Share Posted May 9, 2017 I'm a bit confused by your question in that Ajax is normally used to get server-side data to the client. Could you elaborate on what you're trying to do here? Link to comment Share on other sites More sharing options...
sam67 Posted May 9, 2017 Author Share Posted May 9, 2017 hi yeah sure, so im trying to copy what you have in the book on chapter 15 pages 578, 579, 580, view.php. So when someone clicks the button it submits a bid or a value to the database. i am trying to display a similar concept however struggling with the bidding inputs being on the item list, instead of having to click on the item to then follow onto bid. so therefore not having to click on every item, the bidding inputs will be displayed on each item on the list. Problem i have is individualing ID'S between each item, because they are all on the same page all the item ID'S are over writing one another to the last record. I need them to stay individual to their own items so when theyre passed onto the javascript it can submit the item as clicked on by the user. Thanks for your help, hope to hear from you soon. Sam Link to comment Share on other sites More sharing options...
Larry Posted May 11, 2017 Share Posted May 11, 2017 I assume this is the same question as http://larryullman.com/forums/index.php?/topic/19085-help-with-chapter-15-php-and-javascript-together/ ? I'm replying there as it has more information but let me know if I'm mistaken. Link to comment Share on other sites More sharing options...
Recommended Posts