Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

tal Shnitzer
PLUS
tal Shnitzer
Courses Plus Student 5,242 Points

get request by html form

I try to submit a get request to the server by html form code: ... <div id="continue"> <form action="" method="get"> <input type="submit" value="continue" class="button" formmethod="get" formaction="/"> </form> </div> ... I look at the request on the browser "network" tool and I see that there is a request but there is no method (get). and of corse the server does not respond. I also do the server side in node.js

3 Answers

Shehan Dissanayake
Shehan Dissanayake
19,119 Points

Why don't you just use a button instead of a form?

<button><a href="/">Home</a></button>
Shehan Dissanayake
Shehan Dissanayake
19,119 Points

What is the reason for the GET request? Why didn't you try POST? What is it that you are trying to achieve?

tal Shnitzer
tal Shnitzer
Courses Plus Student 5,242 Points

when clicking on the button the user should get the "homepage"