i make a new field in opportunity tab file name editview.html
this is field
<tr>
<td class="dataLabel"><span sugar='slot31'>{MOD.LBL_VAN}<span class="required">{APP.LBL_REQUIRED_SYMBOL}</span></span sugar='slot'></td>
<td class="dataField" nowrap><span sugar='slot31b'><select tabindex='1' name='van' id="van" onchange="getBookings(document.EditView.van.value, document.EditView.required_date.value,document.Edi tView.hours.value,document.EditView.minutes.value, document.EditView.estimated_time_required.value)" >{VAN}</select></span><div id="van_DIV"></div></td>
<td class="dataLabel"><span sugar='slot11'> </span sugar='slot'></td>
<td class="dataField"><span sugar='slot11b'> </span sugar='slot'></td>
</tr>
in this field i call a function getBookings by using onchange event.
the javascript is given below
function getBookings(van,date,hours,minutes,time)
{
//alert(van);alert(date);alert(hours);alert(minutes) ;alert(time);return;
var strURL="modules/Opportunities/vanbooking.php?van="+van;
var req = getXMLHTTP();
if (req) {
document.getElementById('van').disabled = true;
req.onreadystatechange = function() {
if (req.readyState == 4) {
// only if "OK"
if (req.status == 200) {alert(req.responseText);return;
document.getElementById('van_DIV').innerHTML=req.r esponseText;
} else {
alert("There was a problem while using XMLHTTP:\n" + req.statusText);
}
}
}
req.open("GET", strURL, true);
req.send(null);
}
}
i facing problem how can i call vanbooking.php
and how make db connection in vanbooking.php????


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks