My apps is almost done BUT
im using applescript to reach Safari Form page
If i’m implementing HTML viewer inside my XOJO window1
Is there a way to send javascript to Xojo internal web browser
Im using applescript to read/write to safari and it look like
do JavaScript "document.getElementsByName('customercustomer')[0].selectedIndex=" & v01customer & "" in document 1
i’m back with same question…More precise Can i get return value of webpage I need to get the content of dropdownmenu of web-form to replicate in my desktop app
( Like a synchronization ) to be sure that i have same item to choose
(the dropdownmenu of webform) could change at any time… so i cant hardcoding the item
i have a loop who tell applescript to get it and return each element
Is this could be done with HTMLViewer1.ExecuteJavaScript
Like Dim t as text = HTMLViewer1.ExecuteJavaScript"document.getElementsByName("menu")[0].selectedIndex=" loop ""
I know it return nothing
Thanks
and then get the result in the StatusChanged event… Seeing as I could use this functionality, I will either be looking at how to do it with declares or learning how to code plugins to do this…
Thanks to diging the issue
I’v try the StatusChanged event with window.status BUT
it return only the number of listindex (that i just send myself to the webpage)
Not the text whos attach to listindex
Even in applescript it takes two query to pull out the text (the selectedIndex and the options) together as one string (fullx)
do JavaScript "var indexx=document.getElementsByName(" & "'" & idz & "'" & ")[0].selectedIndex=" & I & ""
do JavaScript "var optionx=document.getElementsByName(" & "'" & idz & "'" & ")[0].options;"
set fullx to do JavaScript "dropdowntext=optionx[indexx].text;"
I’ll continue to follow the statusChanged event with other javascript query…to see what coming out
Theres not much info on these feature
Dim i As Integer
For i = 0 To 20
HTMLViewer1.ExecuteJavaScript"window.status = document.getElementsByName('customercustomer')[0].options[" + str(i) + "].text;"
MsgBox newstatustext
Next
when the loop reach the end of the dropdownmenu… it repeat the last item until the end of i
I think if i got twice same answer, that will stop the loop
Is it make sense??