User:Noeth: Difference between revisions
From Seven Sages of Rome
No edit summary Tags: Reverted Visual edit: Switched |
No edit summary Tags: Reverted Visual edit: Switched |
||
Line 1: | Line 1: | ||
< | <html> | ||
{{ | <form id="redirectForm"> | ||
<input type="text" id="pageName" placeholder="Enter name"> | |||
<input type="button" value="Go to Page" onclick="redirectToPage()"> | |||
</form> | |||
}} | <script> | ||
</ | function redirectToPage() { | ||
var pageName = document.getElementById('pageName').value; | |||
if (pageName) { | |||
var url = mw.util.getUrl('GeoJson:' + pageName); | |||
window.location.href = url; | |||
} else { | |||
alert('Please enter a name'); | |||
} | |||
} | |||
</script> | |||
</html> |
Revision as of 17:54, 10 October 2024