0

can anyone please help me? I am trying to use my submit button as a redirection so that if I click it it will take me to another url .. ( my submit button is on wordpress website plugin)

Comments
  • 0
    why broo?? I can see many people ask about their problems here .. its called helping each other .. 😪😪
  • 1
    That is bad style. A button is supposed to change things WITHIN the current navigation while a link brings you to ANOTHER location.

    If you want something that brings you to another URL, use a fucking link. That will also be accessible to search engines and screenreaders.

    (You can use CSS to style a link to be an area, not just looking like a lext link.)
  • 0
    @Fast-Nop with your idea it works but I need to fetch the typed email address to thar url’s form email address field.. which is my client’s demand.. that’s why I was trying that method
  • 1
    Sounds like a form with a GET method.

    The email input will be passed to the URL of the ACTION in the form and can received at the other end.
  • 0
    @C0D4 yah I am trying with get method and still not working
  • 2
    @fahimbinlokman

    <form action="/someFile.php" method="get">
      Email: <input type="email" name="email">
    <button value=“click me”/>
    </form>

    On someFile.php
    $_GET[“email”] will contain the email from the form
  • 1
    @fahimbinlokman I see three possibilities for that one.

    1) You hand over data between two different URLs (on the same domain) via cookies.
    2) You submit the data to the server on submit and fetch the data on the next URL from the server. That of course requires session management.
    3) You don't really change the URL at all, but instead do some blend in/out CSS transitions like with the Google Webmaster login. Clicking the submit area would then trigger an onclick handler that changes the CSS properties.

    Additional advantage of 3) is that there is no network roundtrip so that users will have an instant UI reaction.
Add Comment