How to link to the login.html page without creating a new browser-tab

2
On https://baseapplication-sandbox.mxapps.io/index.html there a a button “-> Sign-in”, that takes you to the page login.html. There is the minor issue that it creates a new browser-tab to do this. This sign-up button is created by making a button with action ‘open link’ How to link to the login.html page without creating a new browser-tab? *Editted* Used Joshua’s solution, but it gets even simpler by making the sign-in button trigger a nanoflow, which calls a javascript, which is this oneliner: // BEGIN USER CODE window.location.replace("login.html"); // END USER CODE  
asked
3 answers
1

One simple solution would be to do it in javascript. 

You create a button doing nothing, you put a class in it, and your run that code in a html snippet (with jquery enabled) :

$('.mybutton').click(function(){
window.location.replace("login.html");
});

 

answered
0

“sign-in in new tab” sounds like a side-effect or a bug. So the best way is to report this issue to Mendix.

To be honest, I don’t understand why a mix of jQuery with native javascript is a good solution to solve your issue. If this javascript snippet loads before the html button, you’ll get an error (not possible to add the click event to a non-existing element).

For now, in my opinion it’s more easy, readable and maintainable to create a simple link button to navigate to the login page. No custom code if there’s no need.

 

 

 

answered
0

Hi Tim Van,

One simple solution would be to do it in javascript. 

You create a button doing nothing, you put a class in it, and your run that code in a html snippet (with jquery enabled) :

$('.mybutton').click(function(){
window.location.replace("login.html");
});

 

answered