I am trying to simulate a button click on my school portal's login page. However, when I look into code, I see only name and ID and then an "event" button. The "event" button shows a redirection to the jquery file that redirects the user to a specfic link. I attached some parts of a code.
How can I launch that event inside my code to simulate the button click and get automatically redirected.
P.S. I would be constantly checking for responses, so if there is not enough information, please tell me, so I can create a better question.
[This is a picture of a Login button code:
<input id="LoginButton" style="visibility: visible" type="button" value="Log In">event
I need these actions to be performed directly from my application. (This is located in the index.php folder
function gotologinreminder() {
top.location = '/novi/StudentPortal/Home/LoginReminder';
};
$("#LoginButton").click(function () {
$("#msgdisplay").hide();
$("#imgwait").show();
if ($("#Pin").val() == "" || $("#Password").val() == "") {
$("#imgwait").hide();
$("#msg1").show();
return;
};
$("#loginform").submit();
});
$("#loginform").ajaxForm(function (retval) {
if (retval.valid == "0") {
$("#imgwait").hide();
$("#msgmessage").html(retval.msg);
$("#msgdisplay").show();
$("#Pin").val("");
$("#Password").val("");
$("#Pin").focus();
} else {
$(window).off('resize.rightcolumn');
top.location = '/novi/StudentPortal/Home/PortalMainPage';
};
});
function clearmessages() {
$("#msgdisplay").hide();
$("#msg1").hide();
};
Thank you,
Dmitry