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
75 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
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
425 views
+1 vote
1 answer

How can i create simple register form using html and css?

Html5 contains lots of elements using which ...READ MORE

answered Jan 31, 2020 in HTML by Niroj
• 82,540 points
1,646 views
0 votes
1 answer

How to align a <div> to the middle (horizontally/width) of the page?

Hello Kartik, position: absolute and then top:50% and left:50% places the top edge ...READ MORE

answered Apr 23, 2020 in HTML by Niroj
• 82,540 points
70 views
0 votes
1 answer

unable to load image file using <img> tag

This error means that file was not ...READ MORE

answered Oct 7, 2020 in HTML by Niroj
• 82,540 points
196 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
225 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
1,790 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,700 points
111 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,280 points
161 views
0 votes
1 answer

How to schedule a job for SQL query to run daily?

down voteaccepted Expand the SQL Server Agent node ...READ MORE

answered Oct 25, 2018 in Database by Frankie
• 9,810 points
3,372 views
0 votes
1 answer

What is a Tag in Blueprism and what it is used for?

Hello, A Tag is a keyword of term assigned to ...READ MORE

answered Oct 22, 2019 in RPA by Abha
• 28,000 points
1,462 views