03-27-2014، 02:02 AM
سلام کسی میدونه مشکل این کد چیه که کار نمیکنه؟
Sub Globals
Dim WebView1 As WebView
End Sub
dim i as int:i=0
'--------------------------------------------------------------------------
Sub Activity_Create(FirstTime As Boolean)
WebView1.Initialize("WebView1")
Activity.AddView(WebView1, 0, 0, 100%x, 100%y)
WebView1.LoadUrl("http://176.221.29.235/login.aspx")
End Sub
'--------------------------------------------------------------------------
Sub WebView1_PageFinished (Url As String)
if i=0 then
Dim Javascript As StringBuilder
Javascript.Initialize
Javascript.Append("document.forms.form2.txtUserName.value='شماره دانشجویی';")
Javascript.Append("document.forms.form2.txtPassword.value='پسورد';")
Javascript.Append("document.forms.form2.submit()")
Dim WebViewExtras1 As WebViewExtras
WebViewExtras1.executeJavascript(WebView1, Javascript.ToString)
i=1
End If
End Sub
'-------------------------------------
Sub Globals
Dim WebView1 As WebView
End Sub
dim i as int:i=0
'--------------------------------------------------------------------------
Sub Activity_Create(FirstTime As Boolean)
WebView1.Initialize("WebView1")
Activity.AddView(WebView1, 0, 0, 100%x, 100%y)
WebView1.LoadUrl("http://176.221.29.235/login.aspx")
End Sub
'--------------------------------------------------------------------------
Sub WebView1_PageFinished (Url As String)
if i=0 then
Dim Javascript As StringBuilder
Javascript.Initialize
Javascript.Append("document.forms.form2.txtUserName.value='شماره دانشجویی';")
Javascript.Append("document.forms.form2.txtPassword.value='پسورد';")
Javascript.Append("document.forms.form2.submit()")
Dim WebViewExtras1 As WebViewExtras
WebViewExtras1.executeJavascript(WebView1, Javascript.ToString)
i=1
End If
End Sub
'-------------------------------------