Web Analytics Made Easy -
StatCounter Clicking a button with Javascript - CodingForum

Announcement

Collapse
No announcement yet.

Clicking a button with Javascript

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Clicking a button with Javascript

    For school I'm supposed to write a JS code which visits a website, and then clicks on a button on that website. I used the document.location method to visit the web page, but then if I use the document.forms[0].elements[0].click() function to click a button, nothing happens. The click() function has always worked for me when the JS code is embedded in the web page, but its not in this case because the code has to click a button on an external website. So how can I do this? I just need me Javscript program to visit a site, and then click a button on that site. Please help, thanks.

  • #2
    Can't be done with normal browser coding with arbitrary pages.

    The two web pages *MUST* come from the *SAME DOMAIN* or JavaScript is not allowed to "see" the content of the other page.
    Be yourself. No one else is as qualified.

    Comment

    Working...
    X