Html button with id and type - html

How can I do this. I want that my button have ID and TYPE attributs.. is that posible?
<input name="proccess" type="submit" class="invisible" value="1" />
<button id="send-form" TYPE="SUBMIT" class="btn btn-primary top-margin">PoĊĦalji</button>
FIDDLE
And if it is not possible what can i do to create that.

Yes, you can have an id and type attributes.

You should be able to do that, see http://www.w3schools.com/tags/tag_button.asp and http://www.w3schools.com/tags/ref_standardattributes.asp

You have not included .js file in ur fiddle & Try the following :-
<form action="demo_form.asp" method="post">

Related

"action_page.php" in form error leads to Error 404

I want to create a form in HTML and I am leading it to the demo page, "action_page.php". When I press "Submit" it shows Error 404.
I tried changing the attribute up and down but it is still saying Error 404. Is this the right demo link? I double-checked. Can someone show how to fix this and some steps on what to do?
Here is the code I have put to make it clear to you:
<form action="action_page.php"
<input type="submit" value="Submit Survey"
</form>
In conclusion, how can I make the demo link "action_page.php" work? (HTML Answer)
<form action="action_page.php">
<input type="submit" value="Submit Survey">
</form>
Your code must be like that:
<form action="action_page.php" method="GET">
<input type="submit" value="Submit Survey">
</form>

How to change submit button name in HAML?

I am new to Haml and have a form with two submit buttons. To differentiate and handle them in the Controller every single button needs a name.
An example from HAML:
= program_form.submit I18n.t('texts.6OA')
appears in HTML as:
<input type="submit" name="commit" value="Save Template">
but I want something like this:
<input type="submit" name="Button2" value="Save Template">
Any hints?
Have you tried this?
program_form.submit I18n.t('texts.60A'), name: 'Button2'

Angular 5 simple form with Action is not working

The code given below is not working in my angular html file but if i use this code individually in an html file it works i don't know what i am doing wrong this is just a simple form .
<form action='https://easypaystg.easypaisa.com.pk/easypay/Index.jsf' method='post'>
<input name='storeId' value='4950'>
<input name='amount' value='1000'>
<input name='postBackURL' value='https://easypaystg.easypaisa.com.pk/easypay/Confirm.jsf'>
<input name='orderRefNum' value='123113'>
<input name='merchantHashedReq' value='6ohsP8x3PpiaI4oNirWGwjVkyMLP4CbzcH6pZwvu9SViOzx9nLxyR/TtJhwFrxBU686Wf1z22G+TBxuo5QkSscuXp266qQWx8AbGWnLXxG79LHt+5VlD+lH2JkjKO997adwVHH6mGNm8ldtAKkRyf/E92QF5PwhWMjq8i4dlbABIjJxnwPS3x13R/Nbfmlugkz7XpX20DmZ0IhPuGBR95sOpDATIjfW51fuStCVVni4='>
<input name='autoRedirect' value='0'>
<input name='paymentMethod' value='CC_PAYMENT_METHOD'>
<input name='emailAddr' value='johndoe#live.com'>
<input name='mobileNum' value='0123455500'>
<button type="submit" class="btn btn-success" >Submit</button>
<input type='submit' value='asdasd' class="btn">
</form>
You can do it in following way:
<form #form action='https://easypaystg.easypaisa.com.pk/easypay/Index.jsf' method='post'>
...
<button type="submit" class="btn btn-success" (click)="form.submit()">Submit</button>
...
</form>
Use the ngNoForm attribute as documented. This will prevent all "magic" Angular behavior, and you will be able to submit the form in the native way (with page reload).
So something similar to:
<form ngNoForm action='https://easypaystg.easypaisa.com.pk/easypay/Index.jsf' method='post'>
<input name='storeId' value='4950'>
...
<input type='submit' value='asdasd' class="btn">
</form>
Posting a form directly causes a page reload, that's usually not what you want in an Angular application (SPA). Grab the data from the form and send an HTTP request from your code to the server instead.
You should leverage the NgSubmit directive, as described here

HTML file input, name in the input

I'm working on an upload option, now I'm working on the lay-out of my file input. What I want to make is an input where the filename changes with the browse of the file input.
Code Now
<form action="" method="post" enctype="multipart/form-data">
<label for="file">Filename:</label><input type="file" name="file" id="file"><br>
<input class="btn btn-success btn-block uploadform" type="submit" name="submit" value="Submit">
</form>
What I get now
https://scrshot.eu/s/4a157f9.png
What I want to get
https://scrshot.eu/s/b73c306.png
- It has to be still clickable
Does somebody has an idea how to do this?
Thanks.
I found the answer, thank you all
data-filename-placement="inside"

Navigation from a HTML file into another

I have 2 html files in my desktop(login.html & firstpage.html). I have a button in login.html. when i pressed that button i need to navigate to firstpage.html screen.
I have tried like below; I wrote this in login.html page, But it's not working,
<form name="myform">
<input type="button" value="Enter" width="100px" onclick="<a href ='C:\Users\Desktop\firstpage.html'</a>">
</form>
Could anyone please help me to solve this issue.Thanks
Change the code in
<form name="myform" action="firstpage.html">
<input type="submit" value="Enter" width="100px">
</form>
To just link the two files, all you need is to have them in the same folder, and use this line:
<input type="button" value="Enter" width="100px" onclick="document.location='firstpage.html'">
You do not need a form to do this.
Your onclick handler does not need html in it, just the javascript.
You could also do:
Go to page
Make Slight changes in your code like this
</input>
This should work... :)