0
我想要發送和接收來自php文件的數據。什麼是最好的方式來做到這一點?Gmap V3中的GDownloadUrl替換
谷歌地圖V3中GDownloadUrl
的最佳替代品是什麼?
這裏是我現有的功能檢查,如果我成功插入:
function checkSaveGeoFenceData(data,code)
{
//var geoFenceDataJson = eval('(' + json + ')');
if(code===200)
{
//alert("JSON VALUE : "+data+"test");
if(data=="SMGFE\n")
{
alert("Geo Fence " +
document.getElementById("geoFenceName").value +
" Already Exist");
}
else {
alert("Successfully Inserted");
window.opener.location.reload();
window.close();
}
}
else
{
alert("Fail to insert");
}
}
現有的函數從PHP獲取數據:
function processtViewData(json)
{
dataJson = eval('(' + json + ')');
var totalData = dataJson.data1.length;
}
使用後發什麼來修改你的ajax代碼? – biz14 2013-02-28 13:50:12
@ biz14,我編輯了使用POST作爲選項的答案。 – Marcelo 2013-02-28 15:20:38
我將有很多變量和值通過郵寄發送,但在這裏看起來我只有一個選項,或者我必須把它們全部放入一個字符串分隔符&? – biz14 2013-03-01 08:36:33