-
Jan 20th, 2022, 02:32 AM
#1
Thread Starter
PowerPoster
-
Jan 20th, 2022, 03:06 AM
#2
Re: how to insert value in tetxbox of web page and clcik on button
you can try like
Code:
Set ele = ie.Document.getelementsbyname("jform[nome]")(0)
ele.Value = "a"
ele.form.submit
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Jan 20th, 2022, 03:31 AM
#3
Thread Starter
PowerPoster
Re: how to insert value in tetxbox of web page and clcik on button
Originally Posted by westconn1
you can try like
Code:
set ele = ie.document.getelementsbyname("jform[nome]")(0)
ele.value = "a"
ele.form.submit
great!
SORRY bro, have idea to get value in listbox Vallata, think is a loop of item...
Last edited by luca90; Jan 20th, 2022 at 03:45 AM.
-
Jan 20th, 2022, 04:19 AM
#4
Re: how to insert value in tetxbox of web page and clcik on button
try with
Code:
Set ele = ie.Document.getelementbyid("jform_vallata")
ele.Value = ele.Item(5).Value
you might have to loop the items to see which one you want to select
Code:
For Each i In ele.Options
Debug.Print i.Value
Next
Last edited by westconn1; Jan 20th, 2022 at 04:40 AM.
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Jan 20th, 2022, 05:47 AM
#5
Thread Starter
PowerPoster
Re: how to insert value in tetxbox of web page and clcik on button
Originally Posted by westconn1
try with
Code:
Set ele = ie.Document.getelementbyid("jform_vallata")
ele.Value = ele.Item(5).Value
you might have to loop the items to see which one you want to select
Code:
For Each i In ele.Options
Debug.Print i.Value
Next
Bro....
i dont found the class to insert, for example in VALLATA listbox, the value "AREZZO" and click the button CERCA GEOMETRI...
old example from other site...
With IE.Document.forms(0)
.Item("ctl00$ContentPlaceHolder1$ddlCodiceCollegio").Value = "AREZZO"
.Item("ctl00$ContentPlaceHolder1$ddlCodiceCollegio").FireEvent ("onchange")
.Item("ctl00$ContentPlaceHolder1$btnFiltra").Click
End With
Last edited by luca90; Jan 20th, 2022 at 05:51 AM.
-
Jan 20th, 2022, 06:18 AM
#6
Re: [RESOLVED] how to insert value in tetxbox of web page and clcik on button
and click the button CERCA GEOMETRI...
that was not in the question
well you already have the solution
or was there some other question
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Jan 20th, 2022, 07:54 AM
#7
Thread Starter
PowerPoster
Re: [RESOLVED] how to insert value in tetxbox of web page and clcik on button
Originally Posted by westconn1
that was not in the question
well you already have the solution
or was there some other question
... I test, i cannot insert value in list box!
i need to select it from listbox.
-
Jan 21st, 2022, 10:38 AM
#8
Re: [RESOLVED] how to insert value in tetxbox of web page and clcik on button
I see you started a thread on that subject. That was the right thing to do, since this thread was on a totally different question. Since this one is resolved, I'll close this one so that the other question can get all the attention.
My usual boring signature: Nothing
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|