HTML, CSS, JavaScript
Auto Fill-in of External Website Form Data
Gravatar is a globally recognized avatar based on your email address. Auto Fill-in of External Website Form Data
  MarshalR
  All
  Jan 2, 2022 @ 02:29pm

Has anyone created an HTML Page which can access an external website and automatically fill-in Form fields using JavaScript?

What approach did you take (popup Browser Window, etc.) Worked in Chrome?

Gravatar is a globally recognized avatar based on your email address. re: Auto Fill-in of External Website Form Data
  Rick Strahl
  MarshalR
  Jan 2, 2022 @ 03:40pm

You can use remote HTTP calls either directly to the WebSite, or proxied through your own server which can handle more secure access (ie. via credentials/auth)...

XHR or fetch command let you make the HTTP calls. Or if using Web Connection the ajaxJson() function simplifies this handling Http and JSON serialization.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Auto Fill-in of External Website Form Data
  MarshalR
  Rick Strahl
  Jan 24, 2022 @ 07:46am

This is a bit over my head. Any suggested learning resources?

Gravatar is a globally recognized avatar based on your email address. re: Auto Fill-in of External Website Form Data
  Rick Strahl
  MarshalR
  Jan 24, 2022 @ 01:42pm

Here are a couple you can look at:

These are a bit dated, but still relevant. I'd go the ajaxJson() route which is the easiest:

  • Create your FoxPro Endpoint by returning JSON
    • Either: Use a REST Service
    • Or: return JSON from regular Process method
  • use ajaxJSON() to call it
  • Make sure you uncomment the CORS headers in the OnProcessInit()

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Auto Fill-in of External Website Form Data
  MarshalR
  Rick Strahl
  Jan 24, 2022 @ 01:53pm

Thanks for your reply.

Have been filling in Web Forms for years in VFP using the Web Browser control. Want to do this from a Web Page via JavaScript. Maybe via the Window open() command which can give me a reference to the Form Web Page?

© 1996-2024