+ 1
How to link submit button to diffrent page
6 Respuestas
+ 2
as Netkos said too just do this
<form method="post" action="other.php">
<input type="text" name="text">
<input type="submit">OK</input>
</form>
you can put any path at the action where the php file is and you can also use ajax using little js or jQuery.
to make a button that opens another page using anchor tag
<a href="other.html"><button>Go</button></a> or as Netkos said you can do a js redirect too of navigator which doesn't need php redirect.
+ 1
Is your submit button part of a form? If so, you can set the other page as the 'action.' That's where it'll submit the data to for processing.
If you're not using a form, you can easily use jQuery/AJAX to send data to another page for processing.
If you're simply wanting to click a button and have it redirect you, you can make the button a link by using the anchor tag...or you can use JS to redirect...or jQuery to redirect... etc..
What's your actual goal and maybe I can give you a more specific answer?
+ 1
i want to simply redirect my button to other page please give code
+ 1
do this.
<a href="www.google.com"><button>Click</button></a>
or
<button onclick="redirect()">Click</button>
<script>
function redirect(){
window.location.href="www.google.com";
}
</script>
+ 1
Can you please explain your need
0
i will have to write thier window.location.href