I have an OnBase e-Form that I'm building. There are three buttons on the form that all submit
. OnBase does different things based on the name of the button used to submit the form. If the button has a name
of OBBtn_CrossReference
it opens another window with a cross referenced document. I need to programmatically 'click' that button.
I've read several posts about how to use JavaScript to submit a form, but none seem to accomplish my goal. I just need to POST
and to have it appear to come from a button named OBBtn_CrossReference
.
I don't need to submit any data. The way the page is currently set up, the entire page is already a form and since I don't want to break the functionality of the other form buttons it seems I must leave it that way.
UPDATE:
The suggestion below was tested as a call from the onload
event in the body
tag and since the button posts the page reloads and the call is made over and over again spawning unlimited child windows. I would appreciate a suggestion on how to get the button to only be clicked the first time the page is loaded and not on postback.
I know I am a little late to this post, but you can try and leverage a cookie to get this done:
I tested this on the Thick and Thin clients in 10.0 and it worked fine.
The postings on this site are my own and don't necessarily represent my company's positions, strategies or opinions.
There's a
click()
method on links, buttons, checkboxes. For example , I submitted this comment by runningdocument.getElementById('submit-button').click()
from chrome's command line.