Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

236
Visualizações
Open incognito window on a dynamic Form onsubmit using Chrome extension

I am trying to open a new session with a different URL in an incognito window once someone clicks on a button in a normal window browser.

My button code is this: <button onclick=($('#myForm').submit())>Start new session</button>

My Form is created through JS as given here:

let myForm = document.createElement("FORM")
    myForm.setAttribute('action', 'https://stackoverflow.com/${PassingsomeParameters}/')
    myForm.setAttribute('method', 'POST');
    myForm.setAttribute('id', 'myForm');

let myFormFields = document.createElement("INPUT");
    myForm.setAttribute('name', 'MyToken');
    myForm.setAttribute('value', info.headers['SessionToken']);

myForm.appendChild(myFormFields);
$('body').append(myForm);

I am running these codes through a browser extension and it works fine. I would like to open an incognito window with a new session instead so that I can keep the current normal window session active too.

PS the form has the tokens and other information to login directly to the other page and hence I am using a form here.

Thanks!

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda