4
This code is working and running on an existing account on this website, what I want to do is: Add a pause, a kind of While
, Wait
, Sleep
or ReadyState
, after login and before going to the new tab. This line would replace the window.close()
.
<html>
<head>
<title>L2 CR AUTO LOGIN</title>
</head>
<body>
<form id="loginForm" name="loginForm" method="post" action="http://zionweb.l2cr.com/gamecpc6/index.php">
<select name="uni_url" id="logServer" class="validate[required]">
<option class="" value="http://zionweb.l2cr.com/gamecpc6/index.php" fbUrl="" cookieName="" >
Personagem1
</option>
</select>
<input id="username" name="username" type="text" value="CHECKBOSS" class="" />
<input id="password" name="password" type="password" value="123456" class="" />
<input type="hidden" id="loginKid" name="kid" value=""/>
<button onclick="myFunction()">Enter</button>
</form>
<script> function myFunction() {
document.loginForm.submit();
window.close();
window.open("http://zionweb.l2cr.com/gamecpc6/classes/view_templates/rbs.php");
} </script>
</body>
</html>
Wait, Sleep for what ? What is your intention what you want to accomplish, try to leave your question more objective to have objective answers too, for more and it is there Eirc / o
– Gabriel Rodrigues
I need a Wait before window.open(); to open the tab so that the account has already been logged in. Otherwise the automatic login will not happen, because when the page is logged in right after I open a new tab with the URL I want. Without Wait the page will result in not found.
– Erick