0

Hi I've an html page with submit button. I want to call that submit button event froma a different page using javascript.

is it possible? Can some one give me any example. I'm searching for it from hours.

thank you,

jestges
  • 3,396
  • 24
  • 54
  • 88
  • 1
    What do you mean by "from a different page"? What's the relationship between the two pages? – David Tang Jan 27 '11 at 06:22
  • i mean just i want to pass credential to my authentication page (third party) and want to get response by using javascript – jestges Jan 27 '11 at 06:23

1 Answers1

1

You can use form.submit() method.

document.forms["myform"].submit();
Anuraj
  • 16,332
  • 6
  • 48
  • 71
  • form.submit() wil call current form right? but i want to call different page submit button – jestges Jan 27 '11 at 06:22
  • actually that page contains submit button. I want to call that submit button click event. Is it possible? – jestges Jan 27 '11 at 06:25
  • Or you require something like this? http://stackoverflow.com/questions/133925/javascript-post-request-like-a-form-submit – Anuraj Jan 27 '11 at 06:27
  • no actually that is a third party authentication page. Instead of going there and validating just i want to pass credentials from my page and trying to get respoinse. Hope you got it. And it is not a popup window just it is a site – jestges Jan 27 '11 at 06:28