0
我得到上線 「對象錯誤」PageMethods它有什麼問題?
function readWURecord()
{
var ifUSD = "";
try
{var mtcnNo=document.getElementById('ctl00_ContentPlaceHolder1_TxtReferenceNo').value;
if(mtcnNo=='')
{
alert('Provide Reference Number');return false;}
var adoConn=new ActiveXObject("ADODB.Connection");
var adoRS=new ActiveXObject("ADODB.Recordset");
var filename;
var filenamecsv1;
fs=new ActiveXObject("Scripting.FileSystemObject");
filename=document.getElementById('ctl00_ContentPlaceHolder1_hdPath').value+'Trans.mdb';
filenamecsv1="D://Data.csv";
if(fs.FileExists(filename)==true)
{
adoConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+filename+";Persist Security Info=True;Jet OLEDB:Database Password=tradb897");
}
else if(fs1.FileExists(filenamecsv1)==true)
{
PageMethods.GetCurrentTime(document.getElementById("<%=TxtReferenceNo.ClientID%>").value);
和
function OnSuccess(response, userContext, methodName)
{
alert("response");
}
任何人可以幫助我與PageMethods.GetCurrentTime方法哪些問題?
行蹤是你的JavaScript持有?它是在.aspx頁面中,還是在單獨的腳本中? –
javascript is in .js file –
我們需要javascript - 而不是您的服務器端代碼 –