![]() |
Possible function problem, data not entering.
Hello.
I'm really really stuck on this and can't see where I'm going wrong. The idea is you click the button 'save search' and it enters two bits of information.. 'memberid' and 'location' into the database, via AJAX and displays a 'saved!' message after it's clicked. I've debugged it as much as i know how.. echoing the $location and $memberid[0] which both show up correctly, and also testing the php address with the values just typed in, and it enters into the database correctly (ie http://mywebsite.com/savesearch_save...camden&mem=165 directly into the browser address). Can anyone see what I've missed? At the moment you just click the button and nothing happens. Cheers Pat. HTML Code:
<div id="saveSearch"><button onclick="ajaxSaveSearch(true,<?php echo $location;?>,<?php echo $memberid[0];?>)">save search</button></div>Code:
function ajaxSaveSearch(doSave, location, memberid) {PHP Code:
|
solved it... should have concentrated on the html :rolleyes:
ajaxSaveSearch('location',memberid) |
That's one reason why you shouldn't jumble JavaScript with HTML and should keep all the JavaScript in a separate file instead.
|
| All times are GMT +1. The time now is 11:43 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.