I ve a query for form tag

0 votes
Sir I've used one <form> tag and used action="sourceurl.com" In it as a property.
And I've used 2 buttons between the opening and closing tag of <form>, one for logon and another for cancel. So, when i click on the logon button it simply redirects me to that link but when i click on the cancel button it also redirects me to that link. But i want don't want to get redirected when i click on the cancel button
Aug 17, 2020 in HTML by Saksham
• 120 points
739 views
Hello @saksham,
Please share your code so that i can find out what is the problem behind ur error.

1 answer to this question.

0 votes
That might be because button inside form by default is of type "submit". change the type of button and try.

<button (click)="...">...</button>  ---------> this is type="submit"

chnage to

<button (click)="..." type="...">...</button> search and change the type of button as required.

Hope it helps!
answered Nov 2, 2020 by sindhu

Related Questions In HTML

0 votes
1 answer

How to set a border for an HTML div tag?

 you can use border-width:2px; border-style:solid; border-color:black; or as shorthand border: 2px solid ...READ MORE

answered Aug 4, 2022 in HTML by Deepak
• 980 points
739 views
0 votes
0 answers

How to do calculation in PHP using a csv file for retrieving data?

Morning, I have a csv file and i ...READ MORE

Feb 11, 2020 in HTML by anonymous
• 140 points
1,451 views
0 votes
0 answers

What is a form control in HTML?

I was using Twitter Bootstrap which has ...READ MORE

Jul 4, 2022 in HTML by Tejashwini
• 3,820 points
436 views
0 votes
0 answers

How to make a simple modal pop up form using jquery and html?

I've read the jQuery tutorials, but I'm ...READ MORE

Jul 24, 2022 in HTML by Ashwini
• 5,430 points
508 views
0 votes
0 answers

How to use <form:form> </form:form> TAG using HTML in Spring MVC?

How to utilize the <form:form> </form:form> In Spring MVC ...READ MORE

Jul 26, 2022 in HTML by Ashwini
• 5,430 points
389 views
0 votes
0 answers

Should I use <i> tag for icons instead of <span>?

To display icons, both Facebook's HTML and ...READ MORE

Aug 16, 2022 in HTML by Deepak
• 980 points
610 views
0 votes
1 answer

How blockchain hides it's HTML source?

When you click View Source, you see ...READ MORE

answered Jul 17, 2018 in Blockchain by Shashank
• 10,400 points
1,209 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
10,540 views
0 votes
1 answer

Vertically centering text in a div

Try this code: .smallUnitBox { ...READ MORE

answered Sep 3, 2018 in Blockchain by digger
• 26,740 points
829 views
0 votes
1 answer

Using Post and Get for Embedded System Communication

Twitter would be a great place to ...READ MORE

answered Sep 4, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
727 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP