0

First off all total n00b here. Is it possible to skip clicking on HTML button with simple URL string?

example: Im visiting page www.somesite.com/page1 on page1 there is a html button (type=submit, value=ADD) when I press that button it sending me to www.somesite.com/page2

question: Is there a way to put pressing button command in URL that gonna bring me directly to page 2 (something like www.somesite.com/page1&press button value=ADD) ???

Thanks

1 Answer 1

1

Try with jquery

<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js">
<!--<![endif]-->

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title></title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.js"></script>
</head>

<body>

    <form>
        <input id="data" value="132">
        <button class="goToPage">Save</button>
    </form>

    <script>
        $(document).ready(function () {
            $('.goToPage').click(function () {
                var data = $('#data').val();
                window.location = "yourUrl?data=" + data;
            });
        });
    </script>
    <!--[if lt IE 7]>
            <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="#">upgrade your browser</a> to improve your experience.</p>
        <![endif]-->

    <script src="" async defer></script>

</body>

</html>
Sign up to request clarification or add additional context in comments.

4 Comments

Are willing to use jquery?
how to do that?
Just updat my post, i have make a little exemple. If it can help you start with jquery! You should learn it! It's very simple and useful
No success. Do anyone know simpler solution?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.