Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9269523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:08:39+00:00 2026-06-18T15:08:39+00:00

Just as the title says, I need help with javascript code that will open

  • 0

Just as the title says, I need help with javascript code that will open a webpage and fill out the form then submit the information.

Here is what I have currently:

var firstName = 'Billy';
var lastName = 'Bob';
var loginWindow = window.open('my website', 'loginWindow');
loginWindow.document.getElementById('fname').value=firstName;
loginWindow.document.getElementById('lname').value=lastName;
loginWindow.document.form.submit();

(I found it on another post).. but it does not work for me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T15:08:41+00:00Added an answer on June 18, 2026 at 3:08 pm

    There may be XSS (Cross-Site Scripting) restrictions on this. But, there is a solution.

    Browse the source code of the form you want, find the form tag’s action attribute (<form action="THIS STUFF HERE">...</form>), and then do one of the following in the scripting for your page:

    1. Use it as the action of a new form and use the DOM to add hidden input elements with the names and values of the data you want to submit, then use .click() on the submit button to the new form.

    2. Browse in some way to the action URL, but append ?name1=value1&name2=value2&name3=value3..., where name1 and value1, etc., are the names and values of the form fields you want to submit. If there is already something similar to this at the end of the action URL, just add on new &name=value pairs instead of appending a new question mark. (This could be done using an iframe with CSS display: none;.

    Hope this helps!!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So, just like the title says, I need to create an application that gets
Like the title says I need to write a function that will sort a
exactly as title says, I need to put php inside of the javascript that
Just as the title says, I'm trying to create a script that will take
Just what the title says. Help greatly appreciated!
As the title says, I have a few javascript files. There are sections that
As the title says Google Chrome opens window.open(someurl) just fine...but page/window with clicked link
The title says it quite clearly, though I'll give a code example just in
Just what the question title says. I'm using SpringMVC, but that's irrelevant really. I
Just as the title says. I need my memcache.so to put it in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.