0

my goal is to automate filling up a form on one of our sources' website. I made a PHP page and added a frame in the middle which displays (src) the sources' website form. How can I add a javascript or PHP code so entries and the submit buttons are clicked?

I tried researching but so far none gave good ideas. I just need an idea or keyword on what I should be researching for and I will modify this page to help others who are trapped in the same issue as mine.

Jay
  • 590
  • 6
  • 13
  • 29
  • http://programmers.stackexchange.com/questions/171203/what-are-the-difference-between-server-side-and-client-side-programming + http://stackoverflow.com/questions/13840429/what-is-the-difference-between-client-side-and-server-side-programming so that you know the difference between server-side and client-side languages. – Cheery Oct 11 '14 at 02:48

1 Answers1

1

The typical way to populate a form is to "pre-populate" the values in the page that comes to the user's browser:

<input type="text" id="FirstName" name="FirstName" value="<?php echo htmlspecialchars($FirstName);?>" />

you can use Javascript if you wish to populate aftewards, but I don't do this that much as a rule, but here's a simple line:

document.getElementById('FirstName').value='Johnny';

Hope this gets you started. Note that I would avoid iframes because of inherent difficulties in communicating - it's typically not done. There is also ajax but that's another story. Sounds like you need to search the basics.

Oliver Williams
  • 5,966
  • 7
  • 36
  • 78