我一直试图让输入到dojo控件的客户端数据被服务器端代码捕获,然后插入到数据库中。我尝试了隐藏值并从 javascript 调用该函数,但这也不起作用。我使用浏览器调试器,发现错误是因为它没有识别服务器功能。我真的需要尝试让这个工作花费太多时间:
Protected Function load_data()
Dim fd As New feeds_DB
Dim errorMsg As String = String.Empty
errorMsg = clientName.Value.ToString
Dim recordsAffected As Integer = fd.insert_tfeed("",errorMsg)
Return recordsAffected
End Function
function insertData() {
var clientProj = dijit.byId("clientName").get("value");
var clientKey = dijit.byId("clientKey").get("value");
var gnipUrl = dijit.byId("gnipUrl").get("value");
var hiddenInput = dijit.byId("clientName").get("value");
alert("NEW CLIENT DATA ACCEPTED FOR- " + clientProj);
dijit.byId("clientName").set("value", null);
return false;
}
<body class="tundra">
<div id="view1" data-dojo-type="dojox.mobile.View" selected="true">
<td align="left" class="style1"><input type="submit"
id="clientSubmit" onClick="insertData();load_data();"
runat="server" class="style2" dojoType="dojox.mobile.Button" value="Submit">