Webbrowser заполняет поле datetime
Hello, I need your help to fill this field and call the javascript function. webEx.Document.GetElementById("ctl00_ctl00_ContentHolder_ContentHolder_AnaggeliesControl_AnaggeliesView_ProslipsiDateProslipsisEdit").SetAttribute("value", .HmProsl) Dim id As String Dim t As Integer Dim prop0 As String Dim prop1 As String id = "ctl00_ctl00_ContentHolder_ContentHolder_AnaggeliesControl_AnaggeliesView_ProslipsiDateProslipsisEdit" t = 2 prop0 = "ctl00$ctl00$ContentHolder$ContentHolder$AnaggeliesControl$AnaggeliesView$ProslipsiDateProslipsisEdit,,1,,,,0,1,1,,,0,,,-1," prop1 = "" prop1 = "[" prop1 = prop1 & """" prop1 = prop1 & ",," prop1 = prop1 & """" prop1 = prop1 & "," prop1 = prop1 & """" prop1 = prop1 & "08/04/03" prop1 = prop1 & """" prop1 = prop1 & "," prop1 = prop1 & """" prop1 = prop1 & "_ 03" prop1 = prop1 & """" prop1 = prop1 & "," prop1 = prop1 & """" prop1 = prop1 & "08/04/03" prop1 = prop1 & """" prop1 = prop1 & "," prop1 = prop1 & """" prop1 = prop1 & """" prop1 = prop1 & "," prop1 = prop1 & "29" prop1 = prop1 & "," prop1 = prop1 & "0]" Dim ObjArr(3) As Object Try ObjArr(0) = CObj(New String(id)) ObjArr(1) = CObj(t) ObjArr(2) = CObj(New String(prop0)) 'ObjArr(3) = CObj(New String(prop1)) ObjArr(3) = prop1 webEx.Document.InvokeScript("igedit_init", ObjArr) Catch ex As Exception Throw ex End Try With above code I am trying to fill the datetime field and invoke script: language="javascript">try{igedit_init("ctl00_ctl00_ContentHolder_ContentHolder_AnaggeliesControl_AnaggeliesView_ProslipsiDateProslipsisEdit",2,"ctl00$ctl00$ContentHolder$ContentHolder$AnaggeliesControl$AnaggeliesView$ProslipsiDateProslipsisEdit,,1,,,,0,1,1,,,0,,,-1,",[",,","08/04/03","_ 03","08/04/03","",29,0]);}catch(e){window.status="Can't init editor";}</script><input type="text"
Что я уже пробовал:
Я прочитал много примеров, но я не могу достичь этого.
Gerry Schmitz
Просто попробуйте "заполнить дату"; без всех этих струнных вращений и т. д. Тогда пофантазируй.
nito1984
Прежде всего, большое вам спасибо.
Я не понимаю, что вы имеете в виду, я попытался заполнить датой весь Html "id"
1) webEx.Документ.GetElementById("ctl00_ctl00_ContentHolder_Contentholder_anaggeliescontrol_anaggeliesview_proslipsidateproslipsisedit").Метод setAttribute("значение", .HmProsl)
2) igtxtctl00_ctl00_ContentHolder_Contentholder_anaggeliescontrol_anaggeliesview_proslipsidateproslipsisedit
3) ctl00_ctl00_ContentHolder_Contentholder_anaggeliescontrol_anaggeliesview_proslipsidateproslipsisedit_p
и я могу добиться, чтобы заполнить дату
Не могли бы вы сказать, Понимаете ли вы из html-кода, что такое подходящее поле для установки значения ?