Single page app form has no id

John's Avatar


01 Mar, 2018 03:19 AM

I'm having trouble using the login script to authenticate to a single page app with a javascript login. The username and password fields both have id's, but the form itself doesn't have an id. I've see, and also tried the 2.0 nightlies with the same issue. Any help would be appreciated.


The url looks like:

And the script looks like:

document.getElementById( 'user' ).value = 'jsmith';
document.getElementById( 'pass' ).value = 'Demo1234';

document.getElementById( '???' ).submit(); // <-- This line causes the error.

  1. 1 Posted by John on 01 Mar, 2018 03:20 PM

    John's Avatar

    I was able to work it out. The form didn't have an id, but the submit button did. So, rather than submitting the form, I used document.getElementById("ButtonID").click(); and that took care of my immediate issue.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac