G
G
genesis11112019-07-08 01:13:45
JavaScript
genesis1111, 2019-07-08 01:13:45

How to substitute the desired value in the "complex" field?

Hello!
I am writing an extension for autocomplete fields for the site: business.facebook.com
After clicking on create an account, a window appears. I'm trying to fill in the fields using getelementsbytagname... value="Ben" and the value appears in the field, but it doesn't let me go to the next step, because the site thinks that the field is empty.
What's interesting is that auto-completion of fields through a standard browser function works.
Question: how to do it with js?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
ThunderCat, 2019-07-08
@ThunderCat

Most likely, a listener is hung on the field for processing typing, on a keyup or change or input, you need to insert a value and run the corresponding trigger.

D
dollar, 2019-07-08
@dollar

The page has a script that listens for keyboard and other events, but does not detect them. Therefore, it thinks that the user has not entered anything. You need to fire these events in order for that script to check the new value, make sure it's valid, and allow the next step.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question