javascript - How can I autologin into a website with IE? -


I use the source code below in my script.

I have worked fine with the CRM browser.

But did not work with Internet Explorer.

How can I do this?

Someone helps me.

  & lt;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; & Lt; / Title & gt; & Lt; Script language = "javascript" & gt; & Lt ;! - Function Login () {document.form1.action = "http://website.com/login/login.asp"; document.form1.submit (); } // -> & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body onload = "login ()" & gt; & Lt; Form method = post name = "form1" id = "form1" & gt; & Lt; Input type = "hidden" name = "ID_Text" value = "ABCD" & gt; & Lt; Input type = "hidden" name = "PW_Text" value = "ABCD" & gt; & Lt; / Form & gt; & Lt; / Body & gt; & Lt; / Html & gt;    

I am responding to your question for future visitors.

  & lt ;! DOCTYPE html & gt; & Lt; Top & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Script type = "text / javascript" & gt; BoardURL = "http://WEBSITE.COM"; Username = "ABCD"; Password = "ABCD"; Document.write ('& lt; form name = "autoLogin" action = "' + + BoardURL + '/ login / login.asp" method = "post" & gt; & lt; input type = "hidden" name = "ID_ TEXT" value = "'+ user name +'" & gt; & lt; input type = "hidden" name = "PW_TEXT" value = "'+ password +'" & gt; '); Document.forms [0] .submit (); & Lt; / Script & gt; & Lt; / Body & gt; & Lt; / Html & gt;    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -